bug 1498165 - Expose ScalarInfo store numbers and indices r=janerik
authorChris H-C <chutten@mozilla.com>
Tue, 20 Nov 2018 19:57:50 +0000
changeset 503797 8db1d9f8025cc1b3b82134f7a6c59a6cfdeced2a
parent 503796 893aaa718e6fe4ba847498d65154cf1b961cf59e
child 503798 63a07c0d07ae75a54923fa946b656582d74b82eb
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjanerik
bugs1498165
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1498165 - Expose ScalarInfo store numbers and indices r=janerik Depends on D12127 Differential Revision: https://phabricator.services.mozilla.com/D12128
toolkit/components/telemetry/core/ScalarInfo.h
--- a/toolkit/components/telemetry/core/ScalarInfo.h
+++ b/toolkit/components/telemetry/core/ScalarInfo.h
@@ -35,16 +35,26 @@ struct BaseScalarInfo {
     , keyed(aKeyed)
     , products(aProducts)
     , builtin(aBuiltin)
   {}
   virtual ~BaseScalarInfo() {}
 
   virtual const char *name() const = 0;
   virtual const char *expiration() const = 0;
+
+  virtual uint16_t storeOffset() const
+  {
+    return UINT16_MAX;
+  };
+
+  virtual uint32_t storeCount() const
+  {
+    return 1;
+  };
 };
 
 /**
  * "Static" scalar definition: these are the ones riding
  * the trains.
  */
 struct ScalarInfo : BaseScalarInfo {
   uint32_t name_offset;
@@ -67,13 +77,23 @@ struct ScalarInfo : BaseScalarInfo {
     , name_offset(aNameOffset)
     , expiration_offset(aExpirationOffset)
     , store_count(aStoreCount)
     , store_offset(aStoreOffset)
   {}
 
   const char *name() const override;
   const char *expiration() const override;
+
+  uint16_t storeOffset() const override
+  {
+    return store_offset;
+  };
+
+  uint32_t storeCount() const override
+  {
+    return store_count;
+  };
 };
 
 } // namespace
 
 #endif // TelemetryScalarInfo_h__