performance.tests.cpp

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#include <planet/telemetry/counter.hpp>
#include <felspar/test.hpp>


namespace {


    auto const suite = felspar::testsuite("performance/counter");


    auto const tests = suite.test("duplicate-names", [](auto check) {
        planet::telemetry::counter c1{"test-counter"};
        check([]() { planet::telemetry::counter c2{"test-counter"}; })
                .throws(std::logic_error{
                        "There is already a performance counter called test-counter"});
    });


}