h2load: Use floating point duration cast
This commit is contained in:
parent
3a1c37248a
commit
d197d115dc
|
@ -1683,9 +1683,10 @@ int main(int argc, char **argv) {
|
||||||
double rps = 0;
|
double rps = 0;
|
||||||
int64_t bps = 0;
|
int64_t bps = 0;
|
||||||
if (duration.count() > 0) {
|
if (duration.count() > 0) {
|
||||||
auto secd = static_cast<double>(duration.count()) / (1000 * 1000);
|
auto secd = std::chrono::duration_cast<
|
||||||
rps = stats.req_success / secd;
|
std::chrono::duration<double, std::chrono::seconds::period>>(duration);
|
||||||
bps = stats.bytes_total / secd;
|
rps = stats.req_success / secd.count();
|
||||||
|
bps = stats.bytes_total / secd.count();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << R"(
|
std::cout << R"(
|
||||||
|
|
Loading…
Reference in New Issue