Code Monkey home page Code Monkey logo

Comments (4)

mreid-moz avatar mreid-moz commented on August 20, 2024

Yes, the sum, sum_squares_lo, sum_squares_hi, log_sum, and log_sum_squares fields can be omitted.

I don't even see the min and max values in the submitted JSON payloads, so I believe these can be ignored.

There is a bucket_count field in the JSON, which I assume is the same as the "number of buckets" you describe, and if so, this field should be included.

from telemetry-server.

Yoric avatar Yoric commented on August 20, 2024

@mreid-moz Where can I find examples of the format used for keyed histograms?

from telemetry-server.

mreid-moz avatar mreid-moz commented on August 20, 2024

Here is an example from an actual submission (with some empty keyed histograms deleted for brevity):

{
  "SEARCH_COUNTS": {
    "google.searchbar": {
      "sum_squares_hi": 0,
      "values": {
        "1": 0,
        "0": 1
      },
      "histogram_type": 4,
      "bucket_count": 3,
      "sum_squares_lo": 1,
      "range": [
        1,
        2
      ],
      "sum": 1
    }
  },
  "ABOUT_ACCOUNTS_CONTENT_SERVER_LOADED_RATE": {},
  "DEVTOOLS_WEBIDE_CONNECTED_RUNTIME_ID": {},
  "DEVTOOLS_HUD_APP_MEMORY_NAVIGATIONLOADED_V2": {},
  "ABOUT_ACCOUNTS_CONTENT_SERVER_FAILURE_TIME_MS": {},
  "DEVTOOLS_HUD_APP_STARTUP_TIME_SCANEND": {},
  "BLOCKED_ON_PLUGIN_INSTANCE_DESTROY_MS": {},
  "DEVTOOLS_HUD_APP_STARTUP_TIME_NAVIGATIONLOADED": {},
  "BLOCKED_ON_PLUGIN_MODULE_INIT_MS": {},
  "ADDON_SHIM_USAGE": {
    "[email protected]": {
      "sum_squares_hi": 0,
      "values": {
        "5": 0,
        "7": 0,
        "6": 4
      },
      "histogram_type": 1,
      "bucket_count": 16,
      "sum_squares_lo": 144,
      "range": [
        1,
        15
      ],
      "sum": 24
    },
    "{b9db16a4-6edc-47ec-a1f4-b86292ed211d}": {
      "sum_squares_hi": 0,
      "values": {
        "5": 2,
        "4": 0,
        "7": 0,
        "6": 7
      },
      "histogram_type": 1,
      "bucket_count": 16,
      "sum_squares_lo": 302,
      "range": [
        1,
        15
      ],
      "sum": 52
    },
    "{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}": {
      "sum_squares_hi": 0,
      "values": {
        "9": 1,
        "3": 1,
        "2": 0,
        "5": 2,
        "10": 0,
        "6": 1
      },
      "histogram_type": 1,
      "bucket_count": 16,
      "sum_squares_lo": 176,
      "range": [
        1,
        15
      ],
      "sum": 28
    }
  },
  "TELEMETRY_TEST_KEYED_FLAG": {},
  "DEVTOOLS_WEBIDE_CONNECTED_RUNTIME_VERSION": {},
  "TELEMETRY_TEST_KEYED_RELEASE_OPTIN": {}
}

In general, the keyed histograms format should be:

{
  "HISTOGRAM_1_NAME": {
    "KEY_A": { ... same type of histogram as in payload.histograms ... },
    "KEY_B": { ... same type of histogram as in payload.histograms ... }
  },
  "HISTOGRAM_2_NAME": {
    ...
  },
  "HISTOGRAM_N_NAME": {
    ...
  }
}

from telemetry-server.

Yoric avatar Yoric commented on August 20, 2024

Ok, so we get the histogram_type and bucket_count repeated for each key.

I am starting to see a few places where we can optimize the payload if we ever find time to work on this :)

from telemetry-server.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.