Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALPulsar 7.1.1.1-5e288d3
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
SearchTiming.c
Go to the documentation of this file.
1//
2// Copyright (C) 2017 Karl Wette
3//
4// This program is free software; you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation; either version 2 of the License, or
7// (at your option) any later version.
8//
9// This program is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with with program; see the file COPYING. If not, write to the
16// Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17// MA 02110-1301 USA
18//
19
20///
21/// \file
22/// \ingroup lalpulsar_bin_Weave
23///
24
25#include "SearchTiming.h"
26
27#include <lal/LogPrintf.h>
28#include <lal/UserInputParse.h>
29
30///
31/// Container for timings and other information for a timing model
32///
34 /// Whether to record detailed timing information
36 /// Struct holding all parameters for which statistics to output and compute, when, and how
37 const WeaveStatisticsParams *statistics_params;
38 /// Number of output results toplists
39 size_t ntoplists;
40 /// Total wall time
41 double wall_total;
42 /// Total CPU time
43 double cpu_total;
44 /// CPU time taken by various sections
46 /// Current section being timed
48 /// CPU time for current section being timed
50 /// CPU time taken by various coherent/semicoherent statistics
52 /// Section in which each statistic is timed
54 /// Current statistic being timed
56 /// CPU time for current statistic being timed
58};
59
60///
61/// Denominator to use for timing constants
62///
63typedef enum {
65 /// Per number of computed coherent results
67 /// Per number of semicoherent templates
69 /// Per number of semicoherent templates, per number of segments (minus 1)
71 /// Per number of semicoherent templates, per number of segments
73 /// Per semicoherent templates, per number of toplists
77
78///
79/// Names of denominator to use for timing constants
80///
82 [WEAVE_SEARCH_DENOM_PCOH] = "pcoh",
83 [WEAVE_SEARCH_DENOM_PSEMI] = "psemi",
84 [WEAVE_SEARCH_DENOM_PSSM1] = "psemi_psegm1",
85 [WEAVE_SEARCH_DENOM_PSSEG] = "psemi_pseg",
86 [WEAVE_SEARCH_DENOM_PSTOP] = "psemi_ptopl",
87};
88
89///
90/// Parameters of search timing sections
91///
92const struct {
93 const char *name;
94 const char *comment;
97 [WEAVE_SEARCH_TIMING_ITER] = {"iter", "parameter space iteration", WEAVE_SEARCH_DENOM_PSEMI},
98 [WEAVE_SEARCH_TIMING_QUERY] = {"query", "cache queries", WEAVE_SEARCH_DENOM_PSSEG},
99 [WEAVE_SEARCH_TIMING_COH] = {"coh", "computing coherent results", WEAVE_SEARCH_DENOM_PCOH},
100 [WEAVE_SEARCH_TIMING_SEMISEG] = {"semiseg", "computing per-segment semicoherent results", WEAVE_SEARCH_DENOM_PSSM1},
101 [WEAVE_SEARCH_TIMING_SEMI] = {"semi", "computing semicoherent results", WEAVE_SEARCH_DENOM_PSEMI},
102 [WEAVE_SEARCH_TIMING_OUTPUT] = {"output", "result output", WEAVE_SEARCH_DENOM_PSTOP},
103 [WEAVE_SEARCH_TIMING_CKPT] = {"ckpt", "checkpointing", WEAVE_SEARCH_DENOM_PSEMI},
104 [WEAVE_SEARCH_TIMING_CMPL] = {"cmpl", "computing completion-loop results", WEAVE_SEARCH_DENOM_NONE},
105 [WEAVE_SEARCH_TIMING_OTHER] = {"other", "unaccounted", WEAVE_SEARCH_DENOM_NONE},
107
108///
109/// \name Internal functions
110///
111/// @{
112
113static inline double wall_time( void );
114static inline double cpu_time( void );
115
116/// @}
117
118///
119/// Return wall time in seconds
120///
122 void
123)
124{
125 return XLALGetTimeOfDay();
126}
127
128///
129/// Return CPU time in seconds
130double cpu_time(
131 void
132)
133{
134 return XLALGetCPUTime();
135}
136
137///
138/// Create a search timing structure
139///
141 const BOOLEAN detailed_timing,
142 const WeaveStatisticsParams *statistics_params
143)
144{
145
146 // Allocate memory
147 WeaveSearchTiming *tim = XLALCalloc( 1, sizeof( *tim ) );
148 XLAL_CHECK_NULL( tim != NULL, XLAL_ENOMEM );
149
150 // Set fields
151 tim->detailed_timing = detailed_timing;
152 tim->statistics_params = statistics_params;
153 tim->curr_section = WEAVE_SEARCH_TIMING_MAX;
154 tim->curr_statistic = WEAVE_STATISTIC_NONE;
155
156 return tim;
157
158}
159
160///
161/// Destroy a search timing structure
162///
164 WeaveSearchTiming *tim
165)
166{
167 if ( tim ) {
168 XLALFree( tim );
169 }
170}
171
172///
173/// Start timing of search
174///
176 WeaveSearchTiming *tim
177)
178{
179
180 // Check input
181 XLAL_CHECK( tim != NULL, XLAL_EFAULT );
182 XLAL_CHECK( tim->curr_section == WEAVE_SEARCH_TIMING_MAX, XLAL_EINVAL );
183
184 // Get current wall time
185 const double wall_now = wall_time();
186
187 // Get current CPU time
188 const double cpu_now = cpu_time();
189
190 // Start timing
191 tim->wall_total = wall_now;
192 tim->cpu_total = cpu_now;
193 for ( size_t i = 0; i < WEAVE_SEARCH_TIMING_MAX; ++i ) {
194 tim->section_cpu_times[i] = 0;
195 }
196 for ( size_t i = 0; i < XLAL_BIT2IDX( WEAVE_STATISTIC_MAX ); ++i ) {
197 tim->statistic_cpu_times[i] = 0;
198 tim->statistic_section[i] = WEAVE_SEARCH_TIMING_MAX;
199 }
200
201 // Start timing next section
202 tim->curr_section = WEAVE_SEARCH_TIMING_OTHER;
203 tim->curr_section_cpu_time = cpu_now;
204
205 return XLAL_SUCCESS;
206
207}
208
209///
210/// Return elapsed wall and CPU times since start of search timing
211///
213 WeaveSearchTiming *tim,
214 double *wall_elapsed,
215 double *cpu_elapsed
216)
217{
218
219 // Check input
220 XLAL_CHECK( tim != NULL, XLAL_EFAULT );
221 XLAL_CHECK( tim->curr_section < WEAVE_SEARCH_TIMING_MAX, XLAL_EINVAL );
222 XLAL_CHECK( wall_elapsed != NULL, XLAL_EFAULT );
223 XLAL_CHECK( cpu_elapsed != NULL, XLAL_EFAULT );
224
225 // Get current wall time
226 const double wall_now = wall_time();
227
228 // Get current CPU time
229 const double cpu_now = cpu_time();
230
231 // Return elapsed wall and CPU times
232 *wall_elapsed = wall_now - tim->wall_total;
233 *cpu_elapsed = cpu_now - tim->cpu_total;
234
235 return XLAL_SUCCESS;
236
237}
238
239///
240/// Stop timing of search
241///
243 WeaveSearchTiming *tim,
244 double *wall_total,
245 double *cpu_total
246)
247{
248
249 // Check input
250 XLAL_CHECK( tim != NULL, XLAL_EFAULT );
251 XLAL_CHECK( tim->curr_section == WEAVE_SEARCH_TIMING_OTHER, XLAL_EINVAL );
252 XLAL_CHECK( wall_total != NULL, XLAL_EFAULT );
253 XLAL_CHECK( cpu_total != NULL, XLAL_EFAULT );
254
255 // Get current wall time
256 const double wall_now = wall_time();
257
258 // Get current CPU time
259 const double cpu_now = cpu_time();
260
261 // Stop timing previous section
262 tim->section_cpu_times[tim->curr_section] += cpu_now - tim->curr_section_cpu_time;
263
264 // Stop timing
265 tim->wall_total = wall_now - tim->wall_total;
266 tim->cpu_total = cpu_now - tim->cpu_total;
267 tim->curr_section = WEAVE_SEARCH_TIMING_MAX;
268
269 // Compute remaining CPU time from total CPU time and other timed sections
270 tim->section_cpu_times[WEAVE_SEARCH_TIMING_OTHER] = tim->cpu_total;
271 for ( int i = 0; i < WEAVE_SEARCH_TIMING_OTHER; ++i ) {
272 tim->section_cpu_times[WEAVE_SEARCH_TIMING_OTHER] -= tim->section_cpu_times[i];
273 }
274
275 // Return total wall and CPU times
276 *wall_total = tim->wall_total;
277 *cpu_total = tim->cpu_total;
278
279 return XLAL_SUCCESS;
280
281}
282
283///
284/// Change the search section currently being timed
285///
287 WeaveSearchTiming *tim,
288 const WeaveSearchTimingSection prev_section,
289 const WeaveSearchTimingSection next_section
290)
291{
292
293 // Check input
294 XLAL_CHECK( tim != NULL, XLAL_EFAULT );
297 XLAL_CHECK( tim->curr_section == prev_section, XLAL_EINVAL );
298
299 // Get current CPU time
300 const double cpu_now = cpu_time();
301
302 // Stop timing previous section
303 if ( prev_section != WEAVE_SEARCH_TIMING_OTHER ) {
304 tim->section_cpu_times[prev_section] += cpu_now - tim->curr_section_cpu_time;
305 }
306
307 // Change section
308 tim->curr_section = next_section;
309
310 // Start timing next section
311 if ( next_section != WEAVE_SEARCH_TIMING_OTHER ) {
312 tim->curr_section_cpu_time = cpu_now;
313 }
314
315 return XLAL_SUCCESS;
316
317}
318
319///
320/// Change the search statistic currently being timed
321///
323 WeaveSearchTiming *tim,
324 const WeaveStatisticType prev_statistic,
325 const WeaveStatisticType next_statistic
326)
327{
328
329 // Check input
330 XLAL_CHECK( tim != NULL, XLAL_EFAULT );
331 XLAL_CHECK( prev_statistic < WEAVE_STATISTIC_MAX, XLAL_EINVAL );
332 XLAL_CHECK( next_statistic < WEAVE_STATISTIC_MAX, XLAL_EINVAL );
333 XLAL_CHECK( tim->curr_statistic == prev_statistic, XLAL_EINVAL );
334
335 // Get current CPU time
336 const double cpu_now = cpu_time();
337
338 // Stop timing previous statistic
339 if ( prev_statistic & tim->statistics_params->all_statistics_to_compute ) {
340 XLAL_CHECK( tim->statistic_section[XLAL_BIT2IDX( prev_statistic )] == tim->curr_section, XLAL_EINVAL );
341 tim->statistic_cpu_times[XLAL_BIT2IDX( tim->curr_statistic )] += cpu_now - tim->curr_statistic_cpu_time;
342 }
343
344 // Change statistic
345 tim->curr_statistic = next_statistic;
346
347 // Start timing next statistic
348 if ( next_statistic & tim->statistics_params->all_statistics_to_compute ) {
349 tim->statistic_section[XLAL_BIT2IDX( next_statistic )] = tim->curr_section;
350 tim->curr_statistic_cpu_time = cpu_now;
351 }
352
353 return XLAL_SUCCESS;
354
355}
356
357///
358/// Write information from search timing to a FITS file
359///
361 FITSFile *file,
362 const WeaveSearchTiming *tim,
363 const WeaveCacheQueries *queries
364)
365{
366
367 // Check input
368 XLAL_CHECK( file != NULL, XLAL_EFAULT );
369 XLAL_CHECK( tim != NULL, XLAL_EFAULT );
370 XLAL_CHECK( queries != NULL, XLAL_EFAULT );
371
372 // Write total wall and CPU time
373 XLAL_CHECK( XLALFITSHeaderWriteREAL8( file, "wall total", tim->wall_total, "total wall time" ) == XLAL_SUCCESS, XLAL_EFUNC );
374 XLAL_CHECK( XLALFITSHeaderWriteREAL8( file, "cpu total", tim->cpu_total, "total CPU time" ) == XLAL_SUCCESS, XLAL_EFUNC );
375
376 // Return if detailed timing is disabled
377 if ( !tim->detailed_timing ) {
378 return XLAL_SUCCESS;
379 }
380
381 // Get number of computed coherent results, and number of coherent and semicoherent templates
382 UINT8 coh_nres = 0, coh_ntmpl = 0, semi_ntmpl = 0;
383 XLAL_CHECK( XLALWeaveCacheQueriesGetCounts( queries, &coh_nres, &coh_ntmpl, &semi_ntmpl ) == XLAL_SUCCESS, XLAL_EFUNC );
384
385 // Compute denominators for timing constants
386 const UINT8 denoms[WEAVE_SEARCH_DENOM_MAX] = {
387 [WEAVE_SEARCH_DENOM_PCOH] = coh_nres,
388 [WEAVE_SEARCH_DENOM_PSEMI] = semi_ntmpl,
389 [WEAVE_SEARCH_DENOM_PSSM1] = semi_ntmpl * ( tim->statistics_params->nsegments - 1 ),
390 [WEAVE_SEARCH_DENOM_PSSEG] = semi_ntmpl * tim->statistics_params->nsegments,
391 [WEAVE_SEARCH_DENOM_PSTOP] = semi_ntmpl * tim->statistics_params->ntoplists,
392 };
393
395
396 // Get section CPU time and denominator
397 const double section_cpu_time = tim->section_cpu_times[i];
398 const UINT8 section_denom = denoms[cpu_sections[i].denom];
399 const char *section_denom_name = denom_names[cpu_sections[i].denom];
400
401 // Write CPU time taken by timing section
402 {
403 char keyword[64];
404 char comment[1024];
405 snprintf( keyword, sizeof( keyword ), "cpu %s", cpu_sections[i].name );
406 snprintf( comment, sizeof( comment ), "%s CPU time", cpu_sections[i].comment );
407 XLAL_CHECK( XLALFITSHeaderWriteREAL8( file, keyword, section_cpu_time, comment ) == XLAL_SUCCESS, XLAL_EFUNC );
408 }
409
410 // Find any statistics computed within timing section
411 BOOLEAN statistics_computed = 0;
412 double section_cpu_time_remain = section_cpu_time;
413 for ( int j = 0; j < XLAL_BIT2IDX( WEAVE_STATISTIC_MAX ); ++j ) {
414 const double statistic_cpu_time = tim->statistic_cpu_times[j];
415 if ( tim->statistic_section[j] == i && statistic_cpu_time > 0 ) {
416 statistics_computed = 1;
417
418 // Get statistics name and determine statistic-specific denominator
419 UINT8 statistic_denom = 1;
420 const char *statistic_name = WEAVE_STATISTIC_NAME( XLAL_IDX2BIT( j ) );
421 const size_t statistic_name_len = strlen( statistic_name );
422 if ( statistic_name_len > 4 && strcmp( statistic_name + statistic_name_len - 4, "_det" ) == 0 ) {
423
424 // Normalise per-detector statistics by number of detectors
425 statistic_denom = tim->statistics_params->detectors->length;
426
427 }
428
429 // Write CPU time taken to compute statistic
430 {
431 char keyword[64];
432 char comment[1024];
433 snprintf( keyword, sizeof( keyword ), "cpu %s %s", cpu_sections[i].name, statistic_name );
434 snprintf( comment, sizeof( comment ), "%s CPU time", statistic_name );
435 XLAL_CHECK( XLALFITSHeaderWriteREAL8( file, keyword, statistic_cpu_time, comment ) == XLAL_SUCCESS, XLAL_EFUNC );
436 }
437
438 // Write timing constant for computation of statistic
439 if ( section_denom > 0 ) {
440 XLAL_CHECK( section_denom_name != NULL, XLAL_EFAILED );
441 char keyword[64];
442 char comment[1024];
443 snprintf( keyword, sizeof( keyword ), "tau %s %s_%s", cpu_sections[i].name, statistic_name, section_denom_name );
444 snprintf( comment, sizeof( comment ), "%s timing constant", statistic_name );
445 XLAL_CHECK( XLALFITSHeaderWriteREAL8( file, keyword, statistic_cpu_time / section_denom / statistic_denom, comment ) == XLAL_SUCCESS, XLAL_EFUNC );
446 }
447
448 // Compute remaining CPU time in timing section
449 section_cpu_time_remain -= statistic_cpu_time;
450
451 }
452 }
453
454 if ( statistics_computed ) {
455
456 // Write remaining CPU time in timing section
457 char keyword[64];
458 char comment[1024];
459 snprintf( keyword, sizeof( keyword ), "cpu %s other", cpu_sections[i].name );
460 snprintf( comment, sizeof( comment ), "other %s CPU time", cpu_sections[i].comment );
461 XLAL_CHECK( XLALFITSHeaderWriteREAL8( file, keyword, section_cpu_time_remain, comment ) == XLAL_SUCCESS, XLAL_EFUNC );
462
463 } else if ( section_denom > 0 ) {
464
465 // Write timing constant for overall section
466 char keyword[64];
467 char comment[1024];
468 snprintf( keyword, sizeof( keyword ), "tau %s_%s", cpu_sections[i].name, section_denom_name );
469 snprintf( comment, sizeof( comment ), "%s timing constant", cpu_sections[i].comment );
470 XLAL_CHECK( XLALFITSHeaderWriteREAL8( file, keyword, section_cpu_time / section_denom, comment ) == XLAL_SUCCESS, XLAL_EFUNC );
471
472 }
473
474 }
475
476 return XLAL_SUCCESS;
477
478}
479
480// Local Variables:
481// c-file-style: "linux"
482// c-basic-offset: 2
483// End:
int XLALWeaveCacheQueriesGetCounts(const WeaveCacheQueries *queries, UINT8 *coh_nres, UINT8 *coh_ntmpl, UINT8 *semi_ntmpl)
Get number of computed coherent results, and number of coherent and semicoherent templates.
Definition: CacheResults.c:580
int XLALFITSHeaderWriteREAL8(FITSFile UNUSED *file, const CHAR UNUSED *key, const REAL8 UNUSED value, const CHAR UNUSED *comment)
Definition: FITSFileIO.c:1150
int j
int XLALWeaveSearchTimingStatistic(WeaveSearchTiming *tim, const WeaveStatisticType prev_statistic, const WeaveStatisticType next_statistic)
Change the search statistic currently being timed.
Definition: SearchTiming.c:322
int XLALWeaveSearchTimingElapsed(WeaveSearchTiming *tim, double *wall_elapsed, double *cpu_elapsed)
Return elapsed wall and CPU times since start of search timing.
Definition: SearchTiming.c:212
int XLALWeaveSearchTimingWriteInfo(FITSFile *file, const WeaveSearchTiming *tim, const WeaveCacheQueries *queries)
Write information from search timing to a FITS file.
Definition: SearchTiming.c:360
int XLALWeaveSearchTimingStop(WeaveSearchTiming *tim, double *wall_total, double *cpu_total)
Stop timing of search.
Definition: SearchTiming.c:242
const char * name
Definition: SearchTiming.c:93
int XLALWeaveSearchTimingSection(WeaveSearchTiming *tim, const WeaveSearchTimingSection prev_section, const WeaveSearchTimingSection next_section)
Change the search section currently being timed.
Definition: SearchTiming.c:286
const struct @1 cpu_sections[WEAVE_SEARCH_TIMING_MAX]
Parameters of search timing sections.
const char * denom_names[WEAVE_SEARCH_DENOM_MAX]
Names of denominator to use for timing constants.
Definition: SearchTiming.c:81
void XLALWeaveSearchTimingDestroy(WeaveSearchTiming *tim)
Destroy a search timing structure.
Definition: SearchTiming.c:163
static double cpu_time(void)
Return CPU time in seconds.
Definition: SearchTiming.c:130
static double wall_time(void)
Return wall time in seconds.
Definition: SearchTiming.c:121
int XLALWeaveSearchTimingStart(WeaveSearchTiming *tim)
Start timing of search.
Definition: SearchTiming.c:175
WeaveSearchTimingDenominator
Denominator to use for timing constants.
Definition: SearchTiming.c:63
@ WEAVE_SEARCH_DENOM_NONE
Definition: SearchTiming.c:64
@ WEAVE_SEARCH_DENOM_MAX
Definition: SearchTiming.c:75
@ WEAVE_SEARCH_DENOM_PSTOP
Per semicoherent templates, per number of toplists.
Definition: SearchTiming.c:74
@ WEAVE_SEARCH_DENOM_PSSM1
Per number of semicoherent templates, per number of segments (minus 1)
Definition: SearchTiming.c:70
@ WEAVE_SEARCH_DENOM_PCOH
Per number of computed coherent results.
Definition: SearchTiming.c:66
@ WEAVE_SEARCH_DENOM_PSEMI
Per number of semicoherent templates.
Definition: SearchTiming.c:68
@ WEAVE_SEARCH_DENOM_PSSEG
Per number of semicoherent templates, per number of segments.
Definition: SearchTiming.c:72
const char * comment
Definition: SearchTiming.c:94
const WeaveSearchTimingDenominator denom
Definition: SearchTiming.c:95
WeaveSearchTiming * XLALWeaveSearchTimingCreate(const BOOLEAN detailed_timing, const WeaveStatisticsParams *statistics_params)
Create a search timing structure.
Definition: SearchTiming.c:140
Module which collects search timings and builds a timing model.
@ WEAVE_SEARCH_TIMING_COH
Computation of coherent results section.
Definition: SearchTiming.h:46
@ WEAVE_SEARCH_TIMING_MAX
Definition: SearchTiming.h:59
@ WEAVE_SEARCH_TIMING_OUTPUT
Result output section.
Definition: SearchTiming.h:52
@ WEAVE_SEARCH_TIMING_SEMISEG
Computation of per-segment semicoherent results section.
Definition: SearchTiming.h:48
@ WEAVE_SEARCH_TIMING_ITER
Parameter space iteration section.
Definition: SearchTiming.h:42
@ WEAVE_SEARCH_TIMING_QUERY
Cache queries section.
Definition: SearchTiming.h:44
@ WEAVE_SEARCH_TIMING_CKPT
Checkpointing section.
Definition: SearchTiming.h:54
@ WEAVE_SEARCH_TIMING_OTHER
Unaccounted section.
Definition: SearchTiming.h:58
@ WEAVE_SEARCH_TIMING_CMPL
Completion-loop section.
Definition: SearchTiming.h:56
@ WEAVE_SEARCH_TIMING_SEMI
Computation of semicoherent results section.
Definition: SearchTiming.h:50
enum tagWeaveSearchTimingSection WeaveSearchTimingSection
Definition: Weave.h:59
enum tagWeaveStatisticType WeaveStatisticType
Definition: Weave.h:61
@ WEAVE_STATISTIC_MAX
Marker +1 of maximal combined valid statistics value.
@ WEAVE_STATISTIC_NONE
#define WEAVE_STATISTIC_NAME(ws)
Names of all possible statistics.
struct tagFITSFile FITSFile
Representation of a FITS file.
Definition: FITSFileIO.h:54
unsigned char BOOLEAN
uint64_t UINT8
void * XLALCalloc(size_t m, size_t n)
void XLALFree(void *p)
REAL8 XLALGetCPUTime(void)
REAL8 XLALGetTimeOfDay(void)
#define XLAL_BIT2IDX(b)
#define XLAL_IDX2BIT(i)
#define XLAL_CHECK(assertion,...)
#define XLAL_CHECK_NULL(assertion,...)
XLAL_ENOMEM
XLAL_SUCCESS
XLAL_EFAULT
XLAL_EFUNC
XLAL_EINVAL
XLAL_EFAILED
Container for timings and other information for a timing model.
Definition: SearchTiming.c:33
double cpu_total
Total CPU time.
Definition: SearchTiming.c:43
double statistic_cpu_times[XLAL_BIT2IDX(WEAVE_STATISTIC_MAX)]
CPU time taken by various coherent/semicoherent statistics.
Definition: SearchTiming.c:51
double curr_section_cpu_time
CPU time for current section being timed.
Definition: SearchTiming.c:49
WeaveStatisticType curr_statistic
Current statistic being timed.
Definition: SearchTiming.c:55
WeaveSearchTimingSection statistic_section[XLAL_BIT2IDX(WEAVE_STATISTIC_MAX)]
Section in which each statistic is timed.
Definition: SearchTiming.c:53
const WeaveStatisticsParams * statistics_params
Struct holding all parameters for which statistics to output and compute, when, and how.
Definition: SearchTiming.c:37
size_t ntoplists
Number of output results toplists.
Definition: SearchTiming.c:39
double section_cpu_times[WEAVE_SEARCH_TIMING_MAX]
CPU time taken by various sections.
Definition: SearchTiming.c:45
double wall_total
Total wall time.
Definition: SearchTiming.c:41
double curr_statistic_cpu_time
CPU time for current statistic being timed.
Definition: SearchTiming.c:57
WeaveSearchTimingSection curr_section
Current section being timed.
Definition: SearchTiming.c:47
BOOLEAN detailed_timing
Whether to record detailed timing information.
Definition: SearchTiming.c:35