[libc][benchmark] more precise estimate of throughput
This patch increases precision by performing the integer divivion after the multiplication.
This commit is contained in:
parent
ef06327063
commit
bcf394c4d1
|
@ -49,8 +49,8 @@ template <typename SetupType, typename ConfigurationType> struct Runner {
|
|||
}
|
||||
|
||||
~Runner() {
|
||||
const size_t AvgBytesPerIteration = Setup.getBatchBytes() / Setup.BatchSize;
|
||||
const size_t TotalBytes = State.iterations() * AvgBytesPerIteration;
|
||||
const size_t TotalBytes =
|
||||
(State.iterations() * Setup.getBatchBytes()) / Setup.BatchSize;
|
||||
State.SetBytesProcessed(TotalBytes);
|
||||
State.SetItemsProcessed(State.iterations());
|
||||
State.SetLabel((Twine(Configuration.Name) + "," + Distribution.Name).str());
|
||||
|
|
Loading…
Reference in New Issue
Block a user