| 209 | } |
| 210 | |
| 211 | void Run() { |
| 212 | #if !defined(NDEBUG) |
| 213 | LogInfo() << "*** DEBUG build! ***" << Endl; |
| 214 | #endif |
| 215 | |
| 216 | for (const TTest& test : Tests) { |
| 217 | LogInfo() << "Starting test " << test.Name << Endl; |
| 218 | |
| 219 | TInstant started = TInstant::Now(); |
| 220 | try { |
| 221 | test.Func(); |
| 222 | } catch (...) { |
| 223 | LogError() << "test " << test.Name |
| 224 | << " failed: " << CurrentExceptionMessage() |
| 225 | << Endl; |
| 226 | } |
| 227 | |
| 228 | LogInfo() << "List size = " << List.GetSize() << Endl; |
| 229 | |
| 230 | TDuration duration = TInstant::Now() - started; |
| 231 | LogInfo() << "test " << test.Name |
| 232 | << " duration: " << duration |
| 233 | << " (" << (double)duration.MicroSeconds() / (Iterations * NumWriters) << "us per iteration)" |
| 234 | << Endl; |
| 235 | LogInfo() << "Finished test " << test.Name << Endl; |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | private: |
| 240 | void AddTest(const char* name, TTestFunc func) { |
no test coverage detected