Jonathan Schmidt
Jonathan Schmidt

Reputation: 371

Boost Unit Test timing mechanism

Is there some built-in mechanism in the Boost Unit Test framework to check for timing issues. For example to:

I've tried to use the command line parameter such as --report_level or --log_level, but it didn't report anything related to timing.

Thanks

Upvotes: 3

Views: 2670

Answers (2)

Vincent Rouvreau
Vincent Rouvreau

Reputation: 109

  1. Report timing of every test: For Boost.Test to report timings, you need to specify "--report_level=detailed --log_level=all". The test timings will be lost in the output but will look like :

Leaving test case "my_test_1"; testing time: 220mks
Leaving test case"my_test_2"; testing time: 219mks
...

  1. Check for tests exceeding a given time limit : I have never tested it, but boost test framework offers a decorator timeout

Upvotes: 1

Gennadiy Rozental
Gennadiy Rozental

Reputation: 1945

  1. You can specify timeout for the test case
  2. Boost.Test report time for each test unit in detailed report mode
  3. I am looking to implement much more advanced tools for timing tests soon(ish)

Upvotes: 0

Related Questions