Reputation: 6074
I'm using Boost.Test (1.60.0) to test my projects. In order to identify the most time consuming tests, I wanted to know the test duration of every test in milliseconds. The total amount of time consumed by all tests would be also nice.
Does Boost.Test have such a feature? If not how can I implement such a time measurement on my own?
Upvotes: 2
Views: 1629
Reputation: 1014
--log_level=unit_scope
(or BOOST_TEST_LOG_LEVEL
environmental variable)
This doesn't print any test messages but is verbose enough to print durations for each test suite and each test case in any suite.
Upvotes: 4
Reputation: 118330
You did not state which compiler you're using, but the reference to Boost means that it's likely to be gcc
.
gcc
has built-in support for runtime profiling called gprof
. You will find plenty of documentation from a Google search, here's a tutorial to get you started.
Upvotes: 1