mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 11:24:05 +00:00
Return calls per second from speed tests
Sometimes the tests overrun their time limit by varying amounts. Return calls per second based on the amount of time actually spent in the loop instead of how much time we tried to spend in the loop.
This commit is contained in:
parent
07a919cb3e
commit
9ea7bfd19a
|
@ -126,8 +126,9 @@ TEST test_intra_speed(const int width)
|
|||
KVZ_GET_TIME(&clock_now)
|
||||
}
|
||||
|
||||
double test_time = TIME_PER_TEST + KVZ_CLOCK_T_AS_DOUBLE(clock_now) - test_end;
|
||||
sprintf(test_env.msg, "%.3fM x %s:%s",
|
||||
(double)call_cnt / 1000000.0,
|
||||
(double)call_cnt / 1000000.0 / test_time,
|
||||
test_env.strategy->type,
|
||||
test_env.strategy->strategy_name);
|
||||
PASSm(test_env.msg);
|
||||
|
@ -166,8 +167,9 @@ TEST test_intra_dual_speed(const int width)
|
|||
KVZ_GET_TIME(&clock_now)
|
||||
}
|
||||
|
||||
double test_time = TIME_PER_TEST + KVZ_CLOCK_T_AS_DOUBLE(clock_now) - test_end;
|
||||
sprintf(test_env.msg, "%.3fM x %s:%s",
|
||||
(double)call_cnt / 1000000.0,
|
||||
(double)call_cnt / 1000000.0 / test_time,
|
||||
test_env.strategy->type,
|
||||
test_env.strategy->strategy_name);
|
||||
PASSm(test_env.msg);
|
||||
|
@ -210,8 +212,9 @@ TEST test_inter_speed(const int width)
|
|||
KVZ_GET_TIME(&clock_now)
|
||||
}
|
||||
|
||||
double test_time = TIME_PER_TEST + KVZ_CLOCK_T_AS_DOUBLE(clock_now) - test_end;
|
||||
sprintf(test_env.msg, "%.3fM x %s(%ix%i):%s",
|
||||
(double)call_cnt / 1000000.0,
|
||||
(double)call_cnt / 1000000.0 / test_time,
|
||||
test_env.strategy->type,
|
||||
width,
|
||||
width,
|
||||
|
@ -261,8 +264,9 @@ TEST dct_speed(const int width)
|
|||
KVZ_GET_TIME(&clock_now)
|
||||
}
|
||||
|
||||
double test_time = TIME_PER_TEST + KVZ_CLOCK_T_AS_DOUBLE(clock_now) - test_end;
|
||||
sprintf(test_env.msg, "%.3fM x %s:%s",
|
||||
(double)call_cnt / 1000000.0,
|
||||
(double)call_cnt / 1000000.0 / test_time,
|
||||
test_env.strategy->type,
|
||||
test_env.strategy->strategy_name);
|
||||
PASSm(test_env.msg);
|
||||
|
|
Loading…
Reference in a new issue