Commit 975dc0f9 authored by Bo Dong's avatar Bo Dong Committed by Facebook Github Bot

Change Benchmark UserCounter to 64 bit int

Summary: Change UserCounters to 64bit integer to fit big counters like cpu_cycle counting.

Reviewed By: yfeldblum

Differential Revision: D18249661

fbshipit-source-id: 7808ef51e7230aa929ed555ed837ba5dd1962944
parent d3676acb
......@@ -337,7 +337,7 @@ class BenchmarkResultsPrinter {
break;
case UserMetric::Type::CUSTOM:
default:
printf(" %-*d", int(name.length()), ptr->value);
printf(" %-*" PRId64, int(name.length()), ptr->value);
}
} else {
printf(" %-*s", int(name.length()), "NaN");
......
......@@ -57,11 +57,11 @@ class UserMetric {
public:
enum class Type { CUSTOM, TIME, METRIC };
int value{};
int64_t value{};
Type type{Type::CUSTOM};
UserMetric() = default;
/* implicit */ UserMetric(int val, Type typ = Type::CUSTOM)
/* implicit */ UserMetric(int64_t val, Type typ = Type::CUSTOM)
: value(val), type(typ) {}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment