petabridge / NBench

Performance benchmarking and testing framework for .NET applications :chart_with_upwards_trend:
https://nbench.io/
Apache License 2.0
532 stars 46 forks source link

Add human-friendly string formatting #4

Closed skotzko closed 8 years ago

skotzko commented 8 years ago

commas be good

Aaronontheweb commented 8 years ago
D:\Repositories\NBench [reporting-fix +0 ~8 -0]> .\bin\NBench.Runner\NBench.Runner.exe .\tests\NBench.Tests.Performance\bin\Release\NBench.Tests.Performance.dll
--------------- STARTING NBench.Tests.Performance.CounterPerfSpecs ---------------
--------------- BEGIN WARMUP ---------------
Elapsed: 00:00:00.0001548
TotalBytesAllocated - bytes: 0.00 ,bytes: /s 0.00 , ns / bytes: 154,803.86
TotalCollections [Gen2] - collections: 0.00 ,collections: /s 0.00 , ns / collections: 154,803.86
[Counter] TestCounter - operations: 2.00 ,operations: /s 12,919.57 , ns / operations: 77,401.93
--------------- END WARMUP ---------------

--------------- BEGIN RUN ---------------
Elapsed: 00:00:00.3197905
TotalBytesAllocated - bytes: 0.00 ,bytes: /s 0.00 , ns / bytes: 319,790,561.50
TotalCollections [Gen2] - collections: 0.00 ,collections: /s 0.00 , ns / collections: 319,790,561.50
[Counter] TestCounter - operations: 22,973,331.00 ,operations: /s 71,838,677.45 , ns / operations: 13.92
--------------- END RUN ---------------

--------------- BEGIN RUN ---------------
Elapsed: 00:00:00.3199055
TotalBytesAllocated - bytes: 0.00 ,bytes: /s 0.00 , ns / bytes: 319,905,595.30
TotalCollections [Gen2] - collections: 0.00 ,collections: /s 0.00 , ns / collections: 319,905,595.30
[Counter] TestCounter - operations: 22,973,331.00 ,operations: /s 71,812,845.22 , ns / operations: 13.93
--------------- END RUN ---------------

--------------- BEGIN RUN ---------------
Elapsed: 00:00:00.3191670
TotalBytesAllocated - bytes: 0.00 ,bytes: /s 0.00 , ns / bytes: 319,167,069.71
TotalCollections [Gen2] - collections: 0.00 ,collections: /s 0.00 , ns / collections: 319,167,069.71
[Counter] TestCounter - operations: 22,973,331.00 ,operations: /s 71,979,014.07 , ns / operations: 13.89
--------------- END RUN ---------------

--------------- RESULTS: NBench.Tests.Performance.CounterPerfSpecs ---------------
--------------- DATA ---------------
TotalBytesAllocated: Max: 0.00 bytes, Average: 0.00 bytes, Min: 0.00 bytes, StdDev: 0.00 bytes
TotalBytesAllocated: Max / s: 0.00 bytes, Average / s: 0.00 bytes, Min / s: 0.00 bytes, StdDev / s: 0.00 bytes

TotalCollections [Gen2]: Max: 0.00 collections, Average: 0.00 collections, Min: 0.00 collections, StdDev: 0.00 collections
TotalCollections [Gen2]: Max / s: 0.00 collections, Average / s: 0.00 collections, Min / s: 0.00 collections, StdDev / s: 0.00 collections

[Counter] TestCounter: Max: 22,973,331.00 operations, Average: 22,973,331.00 operations, Min: 22,973,331.00 operations, StdDev: 0.00 operations
[Counter] TestCounter: Max / s: 71,979,014.07 operations, Average / s: 71,876,845.58 operations, Min / s: 71,812,845.22 operations, StdDev / s: 89,418.26 operations

--------------- ASSERTIONS ---------------
[PASS] Expected [Counter] TestCounter to must be greater than 10,000,000 operations; actual value was 71,876,845.58 operations.
[PASS] Expected TotalCollections [Gen2] to must be exactly 0 collections; actual value was 0.00 collections.
[PASS] Expected TotalBytesAllocated to must be less than or equal to 16,384 bytes; actual value was 0.00 bytes.

This is how things will look in the next PR

Aaronontheweb commented 8 years ago

Bah, meant to close this in #17