Added optional preloading

This commit is contained in:
Paul-Louis Ageneau
2020-06-09 11:17:09 +02:00
parent 74c5cbcf9f
commit 22a1c56863
5 changed files with 12 additions and 2 deletions

View File

@ -183,10 +183,13 @@ size_t benchmark(milliseconds duration) {
#ifdef BENCHMARK_MAIN
int main(int argc, char **argv) {
try {
rtc::Preload();
size_t goodput = benchmark(30s);
if (goodput == 0)
throw runtime_error("No data received");
rtc::Cleanup();
return 0;
} catch (const std::exception &e) {