Go to the documentation of this file.
13 #include <gtest/gtest.h>
14 #include "../../include/ecl/time/time_data.hpp"
27 TEST(TimeDataTests,container) {
37 TEST(TimeDataTests,statistics) {
44 double avg = time_data.
average();
47 double std_dev = time_data.
stdDev();
48 EXPECT_LT(0.49,std_dev);
49 EXPECT_GT(0.51,std_dev);
50 double variance = time_data.
variance();
51 EXPECT_LT(0.24,variance);
52 EXPECT_GT(0.26,variance);
58 int main(
int argc,
char **argv) {
60 testing::InitGoogleTest(&argc,argv);
61 return RUN_ALL_TESTS();
Device for conveniently storing and analysing benchmarking times.
int main(int argc, char **argv)
void clear()
Reset the container (i.e. clear it).
ecl::Duration average() const
Return the average of the elements currently stored.
TimeStamp Duration
Convenience typedef to associate timestamps with the concept of durations.
ecl::Duration stdDev() const
Return the standard deviation of the elements currently stored.
TEST(TimeDataTests, container)
void push_back(const ecl::Duration &duration)
Append a new timing measurement to the sequence.
ecl::Duration variance() const
Return the variance of the elements currently stored.
ecl_time
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:16:19