pytest-benchmark
pytest-benchmark copied to clipboard
allow specifying timing units in config file
4 million us is not very readable
@nzjrs Hey, can you add some examples of results you have?
sure (names redacted).
I have no special config in setup.cfg
- pytest version 2.7.2
- pytest-benchmark-2.5.0
-------------------- benchmark: 35 tests, min 5 rounds (of min 25.00us), 1.00s max time, timer: time.time --------------------
Name (time in ns) Min Max Mean StdDev Rounds Iterations
------------------------------------------------------------------------------------------------------------------------------
test_xxxxxxxxxxxxxxxxxxxxxxxx 3616274118.4235 3926736116.4093 3801337432.8613 134323422.3798 5 1
test_xxxxxxxxxxxxxxxxxxxxxxx 934967994.6899 1039515972.1375 996915578.8422 49102937.9714 5 1
test_xxxxxxxxxxxxxxxxxxxxxxxxx 1713261842.7277 2014343976.9745 1834535694.1223 130835640.0268 5 1
test_xxxxxxxxxxxxxxxxxxxxxxxx 451087.9517 598907.4707 509405.1361 54865.1868 5 1
test_xxxxxxxxxxxxxxxx 100684881.2103 201082944.8700 140805768.9667 51691588.3115 10 1
test_xxxxxxxxxxxxxxxxxx 243902.2064 2660989.7614 342824.7109 141037.7525 1619 1
test_xxxxxxxxxxxxxxxxxxxxxx 9990930.5573 11000156.4026 10384696.5952 234292.3611 47 1
test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1043081.2836 1753091.8121 1113549.6788 53844.2146 797 1
test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 339984.8938 2264976.5015 398277.4392 128517.8063 2243 1
test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2421140.6708 3205060.9589 2530014.0878 117213.5221 307 1
test_xxxxxxxxxxxxxx 266075.1343 2058982.8491 313034.4932 74945.4572 2934 1
test_xxxxxxxxxxxxxxxx 2980.2322 10800.3616 3161.1047 354.0650 12827 10
test_xxxxxxxxxx 236988.0676 2851009.3689 361907.8179 142963.4091 2840 1
test_xxxxxxxxxxxxxxxxxx 125885.0098 227212.9059 134553.4034 11299.9836 6899 1
test_xxxxxxxxxxx 1513004.3030 1956939.6973 1620058.3205 82555.8707 585 1
test_xxxxxxxxxxxxxxxxx 1480102.5391 5434989.9292 2089262.9084 560907.7803 265 1
test_xxxxxxx[xx] 1470.2479 4026.6249 1578.7510 171.9363 12193 36
test_xxxxxxx[xx] 1422.4295 2715.5472 1513.7275 137.2660 11245 59
test_xxxxxxx[xxxx] 1458.0213 3250.7456 1561.6646 124.9950 11782 52
test_xxxxxxx[xxxx] 1406.2655 3135.8105 1526.3524 151.5049 11336 59
test_xxxxxxx[xx] 18835.0677 40054.3213 22041.5678 3633.9001 363 1
test_xxxxxxx[xx] 27656.5552 50067.9016 30057.5780 2945.0874 11097 3
test_xxxxxxx[xxxx] 28610.2295 58333.0790 31288.4376 3110.8604 11367 3
test_xxxxxxx[xxxx] 390.1395 705.5022 410.5606 28.4341 10867 220
test_xxxxxxxxxxxxxxx[xxxxx] 409030914.3066 416336059.5703 412785434.7229 3184180.9106 5 1
test_xxxxxxxxxxxxxxx[xxxxx] 77979087.8296 89211940.7654 80745697.0215 4237155.0439 12 1
test_xxxxxxxxxxxx[xxxxxx] 508621931.0760 516405820.8466 512513875.9613 5504041.2407 2 1
test_xxxxxxxxxxxx[xxxxxxxxxx] 817564964.2944 817564964.2944 817564964.2944 0.0000 1 1
test_xxxxxxxxxxxx[xxx] 3015061140.0604 3015061140.0604 3015061140.0604 0.0000 1 1
test_xxxxxxxxxxxx[xxxx] 1109302043.9148 1109302043.9148 1109302043.9148 0.0000 1 1
test_xxxxxxxxxxxx[xxx] 5731137990.9515 5731137990.9515 5731137990.9515 0.0000 1 1
test_xxxxxxxxxxx 1760005.9509 2342224.1211 1814912.6060 74223.2835 271 1
test_xxxxxxxxxxx 16391038.8947 18525123.5962 17322548.2305 563239.3295 60 1
test_xxxxxxxxxxxx 100542068.4814 100847959.5184 100752592.0868 114551.7400 10 1
test_xxxxxxxxxxxxxxxxxxx 100719928.7415 100959062.5763 100853562.3550 72953.2499 10 1
------------------------------------------------------------------------------------------------------------------------------
Ok that's a huge table.
The idea that I had in mind when I did the table was alone the lines "the table is for comparing results".
If you don't want to compare everything to everything then you have to use grouping.
There's an alpha release of 3.0 on PyPI that allows even more flexible grouping
Let me know if you have concrete suggestions for improvement.
Also, v3.0 have "thousands separator" - that might help you look at results.
I agree with your point about grouping, but in my application I will never care about nanoseconds. It seems odd that pytest presumes to guess the appropriate measurement unit when I, as the test designer, should rather know what is most useful.
On 5 October 2015 at 12:40, Ionel Cristian Mărieș [email protected] wrote:
Also, v3.0 have "thousands separator" - that might help you look at results.
— Reply to this email directly or view it on GitHub https://github.com/ionelmc/pytest-benchmark/issues/27#issuecomment-145492229 .
So is this mostly a request along the lines of "I want to be able to pick the display unit myself"?
Yes, sorry if that was not clear.
On 5 October 2015 at 12:45, Ionel Cristian Mărieș [email protected] wrote:
So is this mostly a request along the lines of "I want to be able to pick the display unit myself"?
— Reply to this email directly or view it on GitHub https://github.com/ionelmc/pytest-benchmark/issues/27#issuecomment-145493071 .
Ref #38 .
So is this mostly a request along the lines of "I want to be able to pick the display unit myself"?
I have the same inquiry, therefore I just 👍 there.