Performance tests in GoogleTest

1,759 views
Skip to first unread message

Pat J

unread,
Jun 1, 2010, 1:07:39 PM6/1/10
to Google C++ Testing Framework
Hi,

I am trying to see if it's possible to write performance tests using
the Google Test framework. A performance test (my definition) in this
case is just like a regular test except I would like to use some high
profile timers to see how long certain tests take and output the
results to the results xml file.

Does anyone have tips on how I can do this? Thanks.

Pat

Nicolás Brailovsky

unread,
Jun 1, 2010, 1:44:56 PM6/1/10
to Pat J, Google C++ Testing Framework
IIRC gtest already gives you an execution time report if you select xml output. If the resolution of the timer is not enough you can always execute the test in a for-loop ;)

Regards


Nicolás Brailovsky

- Tech blog http://nicolasb.com.ar/
- Blog personal http://monosinfinitos.com.ar/

Vlad Losev

unread,
Jun 1, 2010, 7:55:37 PM6/1/10
to Google C++ Testing Framework
Pat,

You can also dump additional information to the XML file using the RecordProperty API.

- Vlad

2010/6/1 Nicolás Brailovsky <nicola...@gmail.com>
Reply all
Reply to author
Forward
0 new messages