[Xapian-tickets] [Xapian] #767: Make testcases using different backends run in parallel
Xapian
nobody at xapian.org
Tue Jul 31 16:58:24 BST 2018
#767: Make testcases using different backends run in parallel
--------------------+---------------------------
Reporter: gp1308 | Owner: gp1308
Type: task | Status: new
Priority: normal | Milestone:
Component: Other | Version:
Severity: normal | Resolution:
Keywords: | Blocked By:
Blocking: | Operating System: All
--------------------+---------------------------
Comment (by gp1308):
I tried this - In `testrunner.cc`, ignoring the exception handling, output
format with Valgrind disabled:
{{{
128 int children_count = 0;
129 pid_t pid;
130 #ifdef XAPIAN_HAS_HONEY_BACKEND
131 pid = fork();
132 if (pid == 0) {
133 do_tests_for_backend(BackendManagerHoney(datadir));
134 exit(0);
135 }
136 children_count++;
137 #endif
138
139 pid = fork();
140 if (pid == 0) {
141 do_tests_for_backend(BackendManager(string()));
142 exit(0);
143 }
144 children_count++;
145
146 #ifdef XAPIAN_HAS_INMEMORY_BACKEND
147 pid = fork();
148 if (pid == 0) {
149 do_tests_for_backend(BackendManagerInMemory(datadir));
150 exit(0);
151 }
152 children_count++;
153 #endif
154
155 #ifdef XAPIAN_HAS_GLASS_BACKEND
156 {
157 BackendManagerGlass glass_man(datadir);
158 do_tests_for_backend(glass_man);
159 do_tests_for_backend(BackendManagerSingleFile(datadir,
&glass_man));
160 do_tests_for_backend(BackendManagerMulti(datadir,
&glass_man));
161 # ifdef XAPIAN_HAS_REMOTE_BACKEND
162
do_tests_for_backend(BackendManagerRemoteProg(&glass_man));
163
do_tests_for_backend(BackendManagerRemoteTcp(&glass_man));
164 # endif
165 }
166 #endif
167 int status;
168 for (int i = children_count; i != 0; --i) {
169 wait(&status);
170 }
}}}
Run time with parallel:
{{{
real 1m49.777s
user 0m48.546s
sys 0m31.740s
}}}
Run time without parallel:
{{{
real 2m2.414s
user 0m42.655s
sys 0m30.834s
}}}
With Valgrind enabled, I got these prints for few testcases - `Leak
summary:` and ` 304 bytes in 1 blocks are possibly lost in loss record 52
of 57`. I guess these prints are from Valgrind.
--
Ticket URL: <https://trac.xapian.org/ticket/767#comment:2>
Xapian <https://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list