Comments (4)
At a glance, you seem to be using valid code, though I haven't tried to compile it myself. I suggest checking out the develop branch. There are a number of improvements there. The syntax for what you are doing will be slightly different. In the new (1.x) version of the code, you implement a virtual "getExperimentValues" function in your fixture which will return a std::vector<int64_t>. Look at the example found at: https://github.com/DigitalInBlue/Celero/blob/develop/examples/DemoSort.cpp
I ran the DemoSort code locally and hand-verified the output. It seems to be working properly.
[==========]
[ CELERO ]
[==========]
[ STATUS ] Timer resolution: 0.069841 µs
[==========]
[ STAGE ] Baselining
[==========]
[ RUN ] BubbleSort @ 2 [30 samples of 10000 calls each.]
[ DONE ] DemoSort.BubbleSort 0.004795 sec. [1.500889e-008 µs/call] [6662717.543043 calls/sec]
[ BASELINE ] DemoSort.BubbleSort 1.000000 [SD: 259.787201, V: 67489.389655, K: 2.346694]
[ RUN ] BubbleSort @ 4 [30 samples of 10000 calls each.]
[ DONE ] DemoSort.BubbleSort 0.023412 sec. [5.509778e-008 µs/call] [1814955.000634 calls/sec]
[ BASELINE ] DemoSort.BubbleSort 1.000000 [SD: 1259.234863, V: 1585672.441379, K: 0.682062]
[ RUN ] BubbleSort @ 8 [30 samples of 10000 calls each.]
[ DONE ] DemoSort.BubbleSort 0.102721 sec. [2.543689e-007 µs/call] [393129.787760 calls/sec]
[ BASELINE ] DemoSort.BubbleSort 1.000000 [SD: 928.599628, V: 862297.268966, K: 2.080405]
[ RUN ] BubbleSort @ 16 [30 samples of 10000 calls each.]
[ DONE ] DemoSort.BubbleSort 0.357376 sec. [3.234978e-007 µs/call] [309121.095015 calls/sec]
[ BASELINE ] DemoSort.BubbleSort 1.000000 [SD: 40968.705351, V: 1678434818.143678, K: -0.921962]
[ RUN ] BubbleSort @ 32 [30 samples of 10000 calls each.]
[ DONE ] DemoSort.BubbleSort 0.817626 sec. [1.386440e-006 µs/call] [72127.165475 calls/sec]
[ BASELINE ] DemoSort.BubbleSort 1.000000 [SD: 17483.248691, V: 305663984.781609, K: -0.994306]
[ RUN ] BubbleSort @ 64 [30 samples of 10000 calls each.]
[ DONE ] DemoSort.BubbleSort 2.402454 sec. [5.205494e-006 µs/call] [19210.472648 calls/sec]
[ BASELINE ] DemoSort.BubbleSort 1.000000 [SD: 14299.253075, V: 204468638.516092, K: 6.668868]
[==========]
[ STAGE ] Benchmarking
[==========]
[ RUN ] SelectionSort @ 2 [30 samples of 10000 calls each.]
[ DONE ] DemoSort.SelectionSort 0.002610 sec. [8.066668e-009 µs/call] [12396692.640693 calls/sec]
[ BASELINE ] DemoSort.SelectionSort 0.537459 [SD: 195.196052, V: 38101.498851, K: 8.785074]
[ RUN ] SelectionSort @ 4 [30 samples of 10000 calls each.]
[ DONE ] DemoSort.SelectionSort 0.008260 sec. [1.755111e-008 µs/call] [5697644.249901 calls/sec]
[ BASELINE ] DemoSort.SelectionSort 0.318545 [SD: 251.561672, V: 63283.274713, K: 8.190085]
[ RUN ] SelectionSort @ 8 [30 samples of 10000 calls each.]
[ DONE ] DemoSort.SelectionSort 0.033542 sec. [7.440890e-008 µs/call] [1343925.286277 calls/sec]
[ BASELINE ] DemoSort.SelectionSort 0.292524 [SD: 772.468389, V: 596707.412644, K: 2.050899]
[ RUN ] SelectionSort @ 16 [30 samples of 10000 calls each.]
[ DONE ] DemoSort.SelectionSort 0.119642 sec. [2.813067e-007 µs/call] [355483.886985 calls/sec]
[ BASELINE ] DemoSort.SelectionSort 0.869578 [SD: 446.775338, V: 199608.202299, K: 0.016811]
[ RUN ] SelectionSort @ 32 [30 samples of 10000 calls each.]
[ DONE ] DemoSort.SelectionSort 0.397245 sec. [9.048846e-007 µs/call] [110511.334254 calls/sec]
[ BASELINE ] DemoSort.SelectionSort 0.652668 [SD: 3526.746776, V: 12437942.822989, K: 11.845837]
[ RUN ] SelectionSort @ 64 [30 samples of 10000 calls each.]
[ DONE ] DemoSort.SelectionSort 1.382172 sec. [3.158174e-006 µs/call] [31663.869189 calls/sec]
[ BASELINE ] DemoSort.SelectionSort 0.606700 [SD: 12906.186694, V: 166569654.975862, K: -0.718513]
[ RUN ] stdSort @ 2 [30 samples of 10000 calls each.]
[ DONE ] DemoSort.stdSort 0.002456 sec. [7.040001e-009 µs/call] [14204543.650794 calls/sec]
[ BASELINE ] DemoSort.stdSort 0.469055 [SD: 648.811536, V: 420956.409195, K: 22.786177]
[ RUN ] stdSort @ 4 [30 samples of 10000 calls each.]
[ DONE ] DemoSort.stdSort 0.006011 sec. [9.973335e-009 µs/call] [10026736.694678 calls/sec]
[ BASELINE ] DemoSort.stdSort 0.181012 [SD: 466.837371, V: 217937.131034, K: 0.550992]
[ RUN ] stdSort @ 8 [30 samples of 10000 calls each.]
[ DONE ] DemoSort.stdSort 0.011649 sec. [1.779556e-008 µs/call] [5619379.905808 calls/sec]
[ BASELINE ] DemoSort.stdSort 0.069960 [SD: 235.045951, V: 55246.598851, K: 6.762926]
[ RUN ] stdSort @ 16 [30 samples of 10000 calls each.]
[ DONE ] DemoSort.stdSort 0.022655 sec. [3.510223e-008 µs/call] [2848822.124950 calls/sec]
[ BASELINE ] DemoSort.stdSort 0.108508 [SD: 563.976485, V: 318069.475862, K: 15.379154]
[ RUN ] stdSort @ 32 [30 samples of 10000 calls each.]
[ DONE ] DemoSort.stdSort 0.041637 sec. [6.174667e-008 µs/call] [1619520.416243 calls/sec]
[ BASELINE ] DemoSort.stdSort 0.044536 [SD: 250.547089, V: 62773.843678, K: 2.082207]
[ RUN ] stdSort @ 64 [30 samples of 10000 calls each.]
[ DONE ] DemoSort.stdSort 0.109057 sec. [2.042089e-007 µs/call] [489694.585998 calls/sec]
[ BASELINE ] DemoSort.stdSort 0.039229 [SD: 1425.082819, V: 2030861.040230, K: -0.751516]
[==========]
[ STAGE ]
[==========]
from celero.
Develop branch works perfectly :)
from celero.
Great! What compiler, os, and configuration are you using? (Just nice to know where it is being used and tested.)
from celero.
C++11 based code.
g++ 4.8
CFLAGS_BENCHMARK= -std=c++0x -march=native -mpopcnt -O2 -Wall -finline-functions
Ubuntu 14.04 LTS 64-bits
Intel® Core™ i5 CPU M 450 @ 2.40GHz × 4
Memory: 3,7GiB RAM
from celero.
Related Issues (20)
- Multiple warnings during compilation via Microsoft Visual Studio HOT 1
- Compiler errors with aggressive warnings enabled
- error: loop variable 'udm' of type 'const std::__1::shared_ptr<celero::UserDefinedMeasurement>' creates a copy from type 'const std::__1::shared_ptr<celero::UserDefinedMeasurement>' HOT 1
- Documentation link not present in README HOT 1
- Samples and iterations are only computed for first size of problem space (division by zero)
- UDM Fields are not printed properly
- Add User Defined Measurements to output files HOT 1
- Test executable fails: No Baseline case defined for "". Exiting.*** Error code 1 HOT 1
- ARCHIVE_OUTPUT_NAME always has ".dll" even for static builds
- Support vcpkg --triplet x64-windows-static-md
- celero 2.8.0 OSX test build failure HOT 3
- Tests terminate with Signal 11 HOT 4
- Truncation of group and experiment names in standard output HOT 1
- Problems with building / packaging celero HOT 5
- Passing invalid group name in the command line segfaults HOT 1
- [2.8.4 regression] c++: error: no such file or directory: '/wd4251' HOT 1
- Memory Measurement on macOS HOT 3
- Add User-Defined String field to Result Table CSV HOT 3
- Celero/experiments/ExperimentCompressBools has a bad cast HOT 2
- CMAKE_<BUILD_TYPE>_POSTFIX spills into consuming project HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from celero.