1. 02 Mar, 2017 5 commits
    • Fix use of C-style cast. · c846eedf
      Joao Paulo Magalhaes authored
    • Rename BenchmarkCounters to UserCounters (#346) · 9e346556
      jpmag authored
      The name UserCounters seems more accurate than the pleonastic BenchmarkCounters.
    • Add user-defined counters. (#262) · a9a66c85
      jpmag authored
      * Added user counters, and move use of bytes_processed and items_processed to user counter logic.
      
      Each counter is a string-value pair. The counters were
      made available through the State class. Two helper virtual
      methods were added to the Fixture class to allow convenient
      initialization and termination of the counters: InitState()
      and TerminateState(). The reporting of the counters is buggy
      and is still a work in progress, to be completed in the next commits.
      
      * fix bad removal of BenchmarkCounters code during the merge
      
      * add myself to AUTHORS/CONTRIBUTORS
      
      * fix printing to std::cout in csv_reporter
      
      * bytes_per_second and items_per_second are now in the UserCounters class
      
      * add user counters to json reporter
      
      * moving bytes_per_second and items_per_second to their old state
      
      * console reporter dealing ok with user counters.
      
      * update unit tests for user counters
      
      * CSVReporter now prints user counters too.
      
      * cleanup user counters
      
      * reverted changes to cmake files which should have gone into later commits
      
      * fixture_test: fix gcc 4.6 compilation
      
      * remove ctor with default argument
      
      see https://github.com/google/benchmark/pull/262#discussion_r72298055
      
      * use (auto-defined) BENCHMARK_HAS_CXX11 instead of BENCHMARK_INITLIST.
      
      https://github.com/google/benchmark/pull/262#discussion_r72298310
      
      * leanify counters API
      
      Discussions:
      API complexity: https://github.com/google/benchmark/pull/262#discussion_r72298731
      remove std::string dependency (WIP): https://github.com/google/benchmark/pull/262#discussion_r72298142
      spacing & alignment: https://github.com/google/benchmark/pull/262#discussion_r72298422
      
      * remove std::string dependency on public API - changed counter name storage to char*
      
      * Counter ctor: use overloads instead of default arguments
      
      discussion:
      https://github.com/google/benchmark/pull/262#discussion_r72298055
      
      * Use raw pointers to remove dependency on std::vector from public API .
      
      For more info, see discussion at https://github.com/google/benchmark/pull/262#discussion_r72319678 .
      
      * Move counter implementation from benchmark.cc to counter.cc.
      
          See discussion: https://github.com/google/benchmark/pull/262#discussion_r72298980 .
      
      * Remove unused (commented-out) code.
      
      * Moved thread counters to ThreadStats.
      
      * Counters: fixed copy and move constructors.
      
      * Counter: use an inplace buffer for small names.
      
      * benchmark_test: move counters test out of CXX11 preprocessor conditional.
      
      * Counter: fix VS2013 compilation error in char[] initialization.
      
      * Fix typo.
      
      * Expose counters from State.
      
      See discussion: https://github.com/google/benchmark/pull/262#issuecomment-237156951
      
      * Changed counters interface to map-like.
      
      * Fix printing of user counters in ConsoleReporter.
      
      * Applied clang-format to counter.cc and console_reporter.cc.
      
      Command was `clang-format -style=Google -i counter.cc console_reporter.cc`
      I also applied to all other files, but the changes were very
      far-reaching so I rolled those back.
      
      * Rename Counter::Flags_e to Counter::Flags
      
      * Fix use of reserved names in Counter and BenchmarkCounters.
      
      * Counter: Fix move ctor bug + change order of members.
      
      * Fixture: remove tentative methods InitState() and TerminateState().
      
      * Update fixture_test to the new Fixture interface.
      
      * BenchmarkCounters: fixed a bug in the move ctor. Remove call to CHECK_LT().
      
      CHECK_LT() was making the size_t lookup take ~double the time of a string lookup!
      
      * BenchmarkCounters: add option to not print zero counters (defaults to false).
      
      * Add test to compare counter storage and access with std::map.
      
      * README: clarify cost of counter access modes.
      
      * move counter access test to an own test.
      
      * BenchmarkCounters: add move Insert()
      
      * Counters access test: add accelerated lookup by name.
      
      * Fix old range syntax.
      
      * Fix missing include of cstdio
      
      * Fix Visual Studio warning
      
      * VS2013 and lower: fix use of snprintf()
      
      * VS2013: fix use of char[] as a member of std::pair<>.
      
      * change counter storage to std::map
      
      * Remove skipZeroCounters logic
      
      * Fix VS compilation error.
      
      * Implemented request changes to PR #262.
      
      * PR #262: More requested changes.
      
      * README: cleanup counter text.
      
      * PR #262: remove clang-format changes for preexisting code
      
      * Complexity+Counters: fix counter flags which were being ignored.
      
      * Document all Counter::Flag members
      
      * fixed loss of counter values
      
      * ConsoleReporter: remove tabular printing of user counters.
      
      * ConsoleReporter: header printing should not be contingent on user counter names.
      
      * Minor white space and alignment fixes.
      
      * cxx03_test + counters: reuse the BM_empty() function.
      
      * user counters: add note to README on how counters are gathered across threads
  2. 11 Feb, 2017 1 commit
    • Support for Web platforms (#340) · 070c0ca0
      Marat Dukhan authored
      * Implement cycleclock::Now for PNaCl
      
      * Make cycleclock::Now compatible with NaCl/ARM
      
      * Support Emscripten (Asm.js, WebAssembly)
      
      * Rearrange #ifs from to handle specific cases first
      
      * DoNotOptimize without inline asm for Emscripten & PNaCl
  3. 30 Jan, 2017 1 commit
  4. 24 Jan, 2017 1 commit
    • Disable iOS CPU Frequency readout (#335) · 246ee864
      Matt Sieren authored
      * Add macro definition for iOS
      
      Add an additional macro definition for iOS.
      iOS is defined as a Mac OSX invariant in the TargetConditionals include,
      thus we treat it as a subset of OSX within the defines.
      
      * Skip error for hw.cpufrequency on iOS
      
      hw.cpufrequency is not available on iOS devices. As there is no way to reliably
      retrieve the CPU frequency on iOS we are printing out a warning
      that we were unable to detect the CPU frequency and set it to 0.
      
      This only disables cpu frequency readouts on actual physical iOS devices.
      Running this code on the simulator still gives the cpu architecture of
      the host computer as the simulator passes down the sysctl calls to OSX.
  5. 18 Jan, 2017 1 commit
    • Report unrecognized arguments from BENCHMARK_MAIN() macro (#332) · 817bfee2
      Niklas Rosenstein authored
      * BENCHMARK_MAIN() now reports unrecognised command-line flags (see google/benchmark#320)
      
      * add benchmark::ReportUnrecognizedArguments()
      
      Update BENCHMARK_MAIN() to use ReportUnrecognizedArguments() instead of
      having the reporting code directly in the macro.
      
      See issue google/benchmark#320 for reference
      
      * let's stick to american english -- fix type in ReportUnrecognizedArguments()
      
      * make ReportUnrecognizedArguments() print to stderr
      
      * make ReportUnrecognizedArguments() return true if any arguments have been reported (i.e. argc > 1)
  6. 13 Jan, 2017 2 commits
    • HumanReadableNumber(): Simplify output for simple numbers. Examples: (#291) · b4fdf6e9
      jpmag authored
      * HumanReadableNumber(): Simplify output for simple numbers. Examples:
      
      HumanReadableNumber(    0.0)=      0    ---->         0
      HumanReadableNumber(    0.5)=   512m    ---->       0.5
      HumanReadableNumber(    0.9)= 921.6m    ---->       0.9
      HumanReadableNumber(    1.0)=  1024m    ---->         1
      HumanReadableNumber(   1.05)=1075.2m    ---->      1.05
      HumanReadableNumber(    1.1)=    1.1    ---->       1.1
      HumanReadableNumber(    1.2)=    1.2    ---->       1.2
      HumanReadableNumber( 0.0e-1)=      0    ---->         0
      HumanReadableNumber( 0.5e-1)=  51.2m    ---->      0.05
      HumanReadableNumber( 0.9e-1)= 92.16m    ---->      0.09
      HumanReadableNumber( 1.0e-1)= 102.4m    ---->       0.1
      HumanReadableNumber(1.05e-1)=107.52m    ---->     0.105
      HumanReadableNumber( 1.1e-1)=112.64m    ---->      0.11
      HumanReadableNumber( 1.2e-1)=122.88m    ---->      0.12
      HumanReadableNumber( 0.0e-3)=      0    ---->         0
      HumanReadableNumber( 0.5e-3)=524.288u   ---->   524.288u
      HumanReadableNumber( 0.9e-3)=943.718u   ---->   943.718u
      HumanReadableNumber( 1.0e-3)=1048.58u   ---->   1048.58u
      HumanReadableNumber(1.05e-3)=  1101u    ---->   0.00105
      HumanReadableNumber( 1.1e-3)=1.1264m    ---->    0.0011
      HumanReadableNumber( 1.2e-3)=1.2288m    ---->    0.0012
      
      * HumanReadableNumber(): change simple printing threshold to 0.01.
      
      * ToExponentAndMantissa(): refactor branch sequence.
    • Fix librt linking on systems which has it (#331) · 34010bee
      Alt authored
  7. 20 Dec, 2016 1 commit
    • Issue 327 (#328) · 4bf28e61
      BRevzin authored
      Arguments shouldn't be AppendHumanReadable()-ed, they should just be shown as-is.
  8. 09 Dec, 2016 1 commit
  9. 06 Dec, 2016 1 commit
  10. 05 Dec, 2016 2 commits
  11. 03 Dec, 2016 1 commit
  12. 19 Nov, 2016 1 commit
  13. 18 Nov, 2016 1 commit
    • Rewrite compare_bench.py argument parsing. · 23733822
      Eric Fiselier authored
      This patch cleans up a number of issues with how compare_bench.py handled
      the command line arguments.
      
      * Use the 'argparse' python module instead of hand rolled parsing. This gives
        better usage messages.
      
      * Add diagnostics for certain --benchmark flags that cannot or should not
        be used with compare_bench.py (eg --benchmark_out_format=csv).
      
      * Don't override the user specified --benchmark_out flag if it's provided.
      
      In future I would like the user to be able to capture both benchmark output
      files, but this change is big enough for now.
      
      This fixes issue #313.
  14. 28 Oct, 2016 2 commits
  15. 26 Oct, 2016 3 commits
  16. 25 Oct, 2016 1 commit
  17. 24 Oct, 2016 1 commit
  18. 21 Oct, 2016 3 commits
  19. 08 Oct, 2016 6 commits
  20. 07 Oct, 2016 2 commits
  21. 05 Oct, 2016 1 commit
  22. 29 Sep, 2016 1 commit
  23. 26 Sep, 2016 1 commit