diff --git a/lib/nodes/test_rtt.cpp b/lib/nodes/test_rtt.cpp index 98e17e3a2..f7a31c7b7 100644 --- a/lib/nodes/test_rtt.cpp +++ b/lib/nodes/test_rtt.cpp @@ -85,7 +85,7 @@ json_t *TestRTT::Case::getMetadata() { } double TestRTT::Case::getEstimatedDuration() const { - return (count_warmup + count) * rate; + return (count_warmup + count) / rate; } int TestRTT::prepare() { @@ -410,7 +410,7 @@ int TestRTT::_read(struct Sample *smps[], unsigned cnt) { if (current->count_warmup > 0) logger->info("Starting warmup phase. Sending {} samples...", current->count_warmup); - } else if (current->sent == current->count_warmup) + } else if (current->sent + current->sent_warmup == current->count_warmup) logger->info("Completed warmup phase. Sending {} samples...", current->count);