Skip to content

[add] support for google's microbenchmark framework#76

Closed
filipecosta90 wants to merge 4 commits intoHdrHistogram:masterfrom
filipecosta90:google.benchmark
Closed

[add] support for google's microbenchmark framework#76
filipecosta90 wants to merge 4 commits intoHdrHistogram:masterfrom
filipecosta90:google.benchmark

Conversation

@filipecosta90
Copy link
Contributor

enables microbenchmarking hdr_init and hdr_record_values with some common variations.
It's interesting to see that the recording a value, even on a local machine, is as low as 4~5ns.

/HdrHistogram_c/build$ ./test/hdr_histogram_benchmark 
2020-01-23 22:06:15
Running ./test/hdr_histogram_benchmark
Run on (8 X 3900 MHz CPU s)
CPU Caches:
  L1 Data 32 KiB (x4)
  L1 Instruction 32 KiB (x4)
  L2 Unified 256 KiB (x4)
  L3 Unified 6144 KiB (x1)
Load Average: 2.23, 1.47, 1.33
-----------------------------------------------------------------------------
Benchmark                                   Time             CPU   Iterations
-----------------------------------------------------------------------------
BM_hdr_init/1/86400000                    874 ns          872 ns       732705
BM_hdr_init/1/86400000000                1160 ns         1160 ns       574490
BM_hdr_init/2/86400000                   5259 ns         5259 ns       116381
BM_hdr_init/2/86400000000                7337 ns         7337 ns        91258
BM_hdr_init/3/86400000                  17347 ns        17346 ns       100000
BM_hdr_init/3/86400000000               36355 ns        36352 ns        19361
BM_hdr_init/4/86400000                  36577 ns        36576 ns        18668
BM_hdr_init/4/86400000000               36681 ns        36679 ns        19097
BM_hdr_record_values/1/86400000          5.48 ns         5.48 ns    126207360
BM_hdr_record_values/1/86400000000       5.43 ns         5.43 ns    119229511
BM_hdr_record_values/2/86400000          5.49 ns         5.49 ns    125379845
BM_hdr_record_values/2/86400000000       5.43 ns         5.43 ns    128329340
BM_hdr_record_values/3/86400000          5.44 ns         5.44 ns    128320266
BM_hdr_record_values/3/86400000000       5.42 ns         5.42 ns    128289628
BM_hdr_record_values/4/86400000          5.43 ns         5.43 ns    128404477
BM_hdr_record_values/4/86400000000       6.06 ns         6.06 ns    128216870

@mikeb01
Copy link
Contributor

mikeb01 commented Jan 23, 2020

Thank you for the PR, unfortunately it looks like the CI doesn't like the use of the sub module. Perhaps it's not being resolved early enough?

@filipecosta90
Copy link
Contributor Author

@mikeb01 can you add this step on the build of semhaporeci?

git submodule update --init --recursive

@mikeb01
Copy link
Contributor

mikeb01 commented Feb 18, 2020

I've used a zip file instead of a git submodule to handle the dependency, otherwise it is merged in now.

@mikeb01 mikeb01 closed this Feb 18, 2020
@mikeb01
Copy link
Contributor

mikeb01 commented Feb 18, 2020

I also disabled it by default as it uses C++ rather than pure C and may mess up other users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants