From 3ef63399716c7ac213d4016ab9454422f4f9d6d1 Mon Sep 17 00:00:00 2001 From: Ismael Date: Thu, 2 Jun 2016 20:58:14 +0200 Subject: [PATCH] Update Readme.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 5be51532..f34e8870 100644 --- a/README.md +++ b/README.md @@ -142,6 +142,14 @@ BENCHMARK(BM_StringCompare) ->RangeMultiplier(2)->Range(1<<10, 1<<18)->Complexity(); ``` +The following code will specify asymptotic complexity with a lambda function, +that might be used to customize high-order term calculation. + +```c++ +BENCHMARK(BM_StringCompare)->RangeMultiplier(2) + ->Range(1<<10, 1<<18)->Complexity([](size_t n)->double{return n; }); +``` + ### Templated benchmarks Templated benchmarks work the same way: This example produces and consumes messages of size `sizeof(v)` `range_x` times. It also outputs throughput in the