<div dir="ltr"><div><div><div>Considering the example, without using a keyed histogram it would end up as multiple definitions:<br><div>"STORAGE_UPDATE_RESULT_BLOCKLISTS_ADDONS": {<br>
        
        </div><div>  "kind": "categorical",<br>
        </div>
        
          "labels": ["success", "backoff", "network_error",
          "server_error", "sign_error"],<br>  ...<br>},<br><div>"STORAGE_UPDATE_RESULT_BLOCKLISTS_CERTIFICATES": {<br>
        
        </div><div>  "kind": "categorical",<br>
        </div>
        
          "labels": ["success", "backoff", "network_error",
          "server_error", "sign_error"],<br>  ...<br>},<br>...<br><br></div>... instead of the one histogram definition below.<br></div>They all share basically the same histogram definition, but repeat it over multiple definitions.<br></div><div><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 2, 2017 at 3:42 PM, Frank Bertsch <span dir="ltr"><<a href="mailto:fbertsch@mozilla.com" target="_blank">fbertsch@mozilla.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF">
    <p>Georg, what did you mean by "Without using a keyed histogram, the
      label definition would be repeated over multiple histogram
      definitions."?</p><div><div class="gmail-h5">
    <br>
    <div class="gmail-m_3164670883636801537moz-cite-prefix">On 3/2/17 08:18, Georg Fritzsche wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="gmail-h5">
      <div dir="ltr">
        <div>Originally we added keyed histograms to allow using string
          keys that were not all known before.<br>
          However, we have use-cases were it makes sense to use the
          two-level keyed histogram structure (name, key), even when the
          set of keys is known before (e.g. to share common
          definitions).<br>
        </div>
        <div><br>
          So in <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1343855" target="_blank">bug
            1343855</a> we plan to add an additional optional field
          "keys" for keyed histograms that allows specifying the valid
          key strings.<br>
        </div>
        <div>Any recording to the histogram with an invalid key string
          will be ignored and a warning/error be print<br>
        </div>
        <div><br>
          E.g. consider:<br>
          <div>"STORAGE_UPDATE_RESULT": {<br>
          </div>
            "keyed": true,<br>
        </div>
        <div>  "kind": "categorical",<br>
        </div>
        <div>  "keys": ["blocklists.addons", "blocklists.certificates",
          "pinning.pins"],<br>
        </div>
        <div>  "labels": ["success", "backoff", "network_error",
          "server_error", "sign_error"],<br>
            ...<br>
          }<br>
          <br>
        </div>
        <div>Without using a keyed histogram, the label definition would
          be repeated over multiple histogram definitions.<br>
          <br>
        </div>
        <div>Feedback, concerns?<br>
          <br>
        </div>
        <div>Georg<br>
        </div>
      </div>
      <br>
      <fieldset class="gmail-m_3164670883636801537mimeAttachmentHeader"></fieldset>
      <br>
      </div></div><pre>______________________________<wbr>_________________
fhr-dev mailing list
<a class="gmail-m_3164670883636801537moz-txt-link-abbreviated" href="mailto:fhr-dev@mozilla.org" target="_blank">fhr-dev@mozilla.org</a>
<a class="gmail-m_3164670883636801537moz-txt-link-freetext" href="https://mail.mozilla.org/listinfo/fhr-dev" target="_blank">https://mail.mozilla.org/<wbr>listinfo/fhr-dev</a>
</pre>
    </blockquote>
    <br>
  </div>

<br>______________________________<wbr>_________________<br>
fhr-dev mailing list<br>
<a href="mailto:fhr-dev@mozilla.org">fhr-dev@mozilla.org</a><br>
<a href="https://mail.mozilla.org/listinfo/fhr-dev" rel="noreferrer" target="_blank">https://mail.mozilla.org/<wbr>listinfo/fhr-dev</a><br>
<br></blockquote></div><br></div></div></div></div></div></div>