catchorg / catchorg/Catch2

Can specify or unify the time unit for bench testing

Open
#2,908 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
21.5k
Forks
3.5k
Avg merge
3d 16h
Merged PRs (30d)
2

Description

**Description**

When I run catch2 benchmarks, I got some result like:

```
benchmark name samples iterations mean
-------------------------------------------------------------------------------
xxx 100 138 145.246 ns
xxx 100 81 245.556 ns
xxx 100 49 408.755 ns
xxx 100 35 572.086 ns
xxx 100 117 150.47 ns
xxx 100 70 287.971 ns
xxx 100 5 4.2428 us
xxx 100 100 199.36 ns
```

There is a microsecond in a pile of nanoseconds, which can easily cause confusion. Is there any way to unify the time unit?

Furthermore, can the precision of decimal output be standardized? For example, all outputs are to two decimal places.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.