First draft of (experimental) benchmarking support
This commit is contained in:
parent
a1e3f0b624
commit
a9b6813ad9
14 changed files with 227 additions and 20 deletions
|
@ -158,6 +158,14 @@ namespace Catch {
|
|||
bool aborting;
|
||||
};
|
||||
|
||||
struct BenchmarkInfo {
|
||||
std::string name;
|
||||
};
|
||||
struct BenchmarkStats {
|
||||
BenchmarkInfo info;
|
||||
size_t iterations;
|
||||
uint64_t elapsedTimeInNanoseconds;
|
||||
};
|
||||
class MultipleReporters;
|
||||
|
||||
struct IStreamingReporter {
|
||||
|
@ -177,11 +185,17 @@ namespace Catch {
|
|||
virtual void testCaseStarting( TestCaseInfo const& testInfo ) = 0;
|
||||
virtual void sectionStarting( SectionInfo const& sectionInfo ) = 0;
|
||||
|
||||
// *** experimental ***
|
||||
virtual void benchmarkStarting( BenchmarkInfo const& ) {}
|
||||
|
||||
virtual void assertionStarting( AssertionInfo const& assertionInfo ) = 0;
|
||||
|
||||
// The return value indicates if the messages buffer should be cleared:
|
||||
virtual bool assertionEnded( AssertionStats const& assertionStats ) = 0;
|
||||
|
||||
// *** experimental ***
|
||||
virtual void benchmarkEnded( BenchmarkStats const& ) {}
|
||||
|
||||
virtual void sectionEnded( SectionStats const& sectionStats ) = 0;
|
||||
virtual void testCaseEnded( TestCaseStats const& testCaseStats ) = 0;
|
||||
virtual void testGroupEnded( TestGroupStats const& testGroupStats ) = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue