Skip to content

Commit

Permalink
Document manualBench
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry Qin committed Aug 15, 2018
1 parent 2dcb468 commit 5676231
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Perf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ namespace PerfUtils {
delete[] latencies;
return stats;
}

/**
* Run the given function for numIterations, and compute statistics on the
* times reported by the function itself. The only argument to the function
* is an output parameter where the measured time should be placed.
*/
Statistics manualBench(void (*function)(uint64_t*), int numIterations) {
uint64_t* latencies = new uint64_t[numIterations];

Expand Down

0 comments on commit 5676231

Please sign in to comment.