File tree 2 files changed +4
-4
lines changed 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -252,7 +252,7 @@ struct benchmarker {
252
252
// Statistics about the JSON file independent of its speed (amount of utf-8, structurals, etc.).
253
253
// Loaded on first parse.
254
254
json_stats* stats;
255
- // Speed and event summary for full parse (not including allocation)
255
+ // Speed and event summary for full parse (including allocation, stage 1 and stage 2 )
256
256
event_aggregate all_stages{};
257
257
// Speed and event summary for stage 1
258
258
event_aggregate stage1{};
@@ -431,7 +431,7 @@ struct benchmarker {
431
431
return 100.0 * a / b;
432
432
}
433
433
434
- void print (bool tabbed_output, size_t iterations ) const {
434
+ void print (bool tabbed_output) const {
435
435
if (tabbed_output) {
436
436
char * filename_copy = (char *)malloc (strlen (filename)+1 );
437
437
strcpy (filename_copy, filename);
@@ -509,7 +509,7 @@ struct benchmarker {
509
509
freqmin, freqmax, freqall);
510
510
}
511
511
}
512
- printf (" \n %.1f documents parsed per second\n " , static_cast < double >(iterations) /static_cast <double >(loop .best .elapsed_sec ()));
512
+ printf (" \n %.1f documents parsed per second (best) \n " , 1.0 /static_cast <double >(all_stages .best .elapsed_sec ()));
513
513
}
514
514
}
515
515
};
Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ int main(int argc, char *argv[]) {
202
202
if (!options.verbose ) { progress.erase (); }
203
203
204
204
for (size_t i=0 ; i<options.files .size (); i++) {
205
- benchmarkers[i]->print (options.tabbed_output , options. iterations );
205
+ benchmarkers[i]->print (options.tabbed_output );
206
206
delete benchmarkers[i];
207
207
}
208
208
You can’t perform that action at this time.
0 commit comments