Commit e537e97f authored by Paul Bone's avatar Paul Bone
Browse files

Bug 1786864 - Add telemetry for how long we spend gathering memory telemetry r=kmag

parent e6e58c96
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1295,6 +1295,18 @@
    "n_buckets": 100,
    "description": "Maximum-sized block of contiguous virtual memory (KB)"
  },
  "MEMORY_COLLECTION_TIME": {
    "record_in_processes": ["all"],
    "products": ["firefox"],
    "alert_emails": ["memshrink-telemetry-alerts@mozilla.com"],
    "expires_in_version": "never",
    "kind": "exponential",
    "low": 1,
    "high": 60000,
    "n_buckets": 32,
    "bug_numbers": [1786864],
    "description": "Time spent gathering memory telemetry in milliseconds"
  },
  "MEMORY_JS_COMPARTMENTS_SYSTEM": {
    "record_in_processes": ["main", "content"],
    "products": ["firefox", "fennec", "thunderbird"],
+1 −0
Original line number Diff line number Diff line
@@ -272,6 +272,7 @@ nsresult MemoryTelemetry::GatherReports(
  // asynchronously, on a background thread.
  RefPtr<Runnable> runnable = NS_NewRunnableFunction(
      "MemoryTelemetry::GatherReports", [mgr, completionRunnable]() mutable {
        Telemetry::AutoTimer<Telemetry::MEMORY_COLLECTION_TIME> autoTimer;
        RECORD(MEMORY_VSIZE, Vsize, UNITS_BYTES);
#if !defined(HAVE_64BIT_BUILD) || !defined(XP_WIN)
        RECORD(MEMORY_VSIZE_MAX_CONTIGUOUS, VsizeMaxContiguous, UNITS_BYTES);