Bug 1776931 - Use types for SpiderMonkey telemetry. r=jandem,jonco
Similar to Glean FoG, use types for telemetry metrics. For our existing probes, this is mainly about using TimeDuration directly. The reported values continue to be unchanged. Differential Revision: https://phabricator.services.mozilla.com/D150659
This commit is contained in:
@@ -1316,7 +1316,7 @@ static bool SetPromiseRejectionTrackerCallback(JSContext* cx, unsigned argc,
|
||||
|
||||
// clang-format off
|
||||
static const char* telemetryNames[static_cast<int>(JSMetric::Count)] = {
|
||||
#define LIT(NAME) #NAME,
|
||||
#define LIT(NAME, _) #NAME,
|
||||
FOR_EACH_JS_METRIC(LIT)
|
||||
#undef LIT
|
||||
};
|
||||
@@ -1359,7 +1359,7 @@ static void WriteTelemetryDataToDisk(const char* dir) {
|
||||
return true;
|
||||
};
|
||||
|
||||
for (int id = 0; id < size_t(JSMetric::Count); id++) {
|
||||
for (size_t id = 0; id < size_t(JSMetric::Count); id++) {
|
||||
auto clear = MakeScopeExit([&] { telemetryResults[id].clearAndFree(); });
|
||||
if (!initOutput(telemetryNames[id])) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user