Commit 075a8a6f by Dominic Hamon

Merge pull request #195 from dvyukov/patch-1

Fix SetLabel usage example
parents b2e73408 838719dc
...@@ -305,10 +305,10 @@ public: ...@@ -305,10 +305,10 @@ public:
// If this routine is called, the specified label is printed at the // If this routine is called, the specified label is printed at the
// end of the benchmark report line for the currently executing // end of the benchmark report line for the currently executing
// benchmark. Example: // benchmark. Example:
// static void BM_Compress(int iters) { // static void BM_Compress(benchmark::State& state) {
// ... // ...
// double compress = input_size / output_size; // double compress = input_size / output_size;
// benchmark::SetLabel(StringPrintf("compress:%.1f%%", 100.0*compression)); // state.SetLabel(StringPrintf("compress:%.1f%%", 100.0*compression));
// } // }
// Produces output that looks like: // Produces output that looks like:
// BM_Compress 50 50 14115038 compress:27.3% // BM_Compress 50 50 14115038 compress:27.3%
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment