<commit_before>{% set ns = "stats." + site %}
{% set base = "https://graphite-sjc.mozilla.org/render/?width={0}&height={1}"|f(width, height) %}

{% set site_name = {
    'pamo': 'Preview',
    'namo': 'Next',
    'amo': 'Production',
}[site] %}

{% set site_url = {
    'pamo': 'https://addons.allizom.org',
    'namo': 'https://addons-next.allizom.org',
    'amo': 'https://addons.mozilla.org',
}[site] %}

{% set fifteen = "from=-15minutes&title=15 minutes" %}
{% set hour = "from=-1hours&title=1 hour" %}
{% set day = "from=-24hours&title=24 hours" %}
{% set week = "from=-7days&title=7 days" %}

{% macro grid() %}
  <img class="fifteen" src="{{ base }}&{{ caller()|trim }}&{{ fifteen }}">
  <img class="hour" src="{{ base }}&{{ caller()|trim }}&{{ hour }}">
  <img class="day" src="{{ base }}&{{ caller()|trim }}&{{ day }}">
  <img class="week" src="{{ base }}&{{ caller()|trim }}&{{ week }}">
{% endmacro %}

<!DOCTYPE html>
<html>
  <head>
    <title>Graphite for {{ site_name }}</title>
  </head>
  <body>
    <h1>Graphite for <a href="{{ site_url }}">{{ site_url }}</a></h1>
    <p>If you don't see pictures, you don't have LDAP authentication.</p>
    <ul>
      <li><a href="#responses">All Responses</a></li>
      <li><a href="#errors">Redirects and Errors</a></li>
      <li><a href="#celery">Celery</a></li>
    </ul>

    <h2 id="responses">All Responses</h2>
    {% call grid() %}
      target=sumSeries%28{{ ns }}.response.*%29&target={{ ns }}.response.200&target={{ ns }}.response.301&target={{ ns }}.response.302&target={{ ns }}.response.403&target={{ ns }}.response.404&target={{ ns }}.response.405&target={{ ns }}.response.500
    {% endcall %}


    <h2 id="errors">Redirects and Errors</h2>
    {% call grid() %}
      target={{ ns }}.response.301&target={{ ns }}.response.302&target={{ ns }}.response.304&target={{ ns }}.response.400&target={{ ns }}.response.403&target={{ ns }}.response.404&target={{ ns }}.response.405&target={{ ns }}.response.500&target={{ ns }}.response.503
    {% endcall %}

    <h2 id="celery">Celery (<a href="{{ url('zadmin.celery') }}">details</a>)</h2>
    {% call grid() %}
      target=sumSeries({{ site }}.celery.tasks.pending.*.*.*)&target=nonNegativeDerivative(sumSeries({{ site }}.celery.tasks.total.*.*.*))&target=nonNegativeDerivative(sumSeries({{ site }}.celery.tasks.failed.*.*.*))
    {% endcall %}
    <script>
      /* Press `r` to only update the pictures that really need it. */
      var classes = {
        /* Map CSS class to [last updated, update threshold]. */
        fifteen: [new Date, 0],
        hour: [new Date, 30],
        day: [new Date, 60],
        week: [new Date, 600],
      }

      /* Remember the original src. */
      var imgs = document.querySelectorAll('img');
      for (var i = 0; i < imgs.length; i++) {<commit_msg>add the blocklist perf to graphite<commit_after>{% set ns = "stats." + site %}
{% set base = "https://graphite-sjc.mozilla.org/render/?width={0}&height={1}"|f(width, height) %}

{% set site_name = {
    'pamo': 'Preview',
    'namo': 'Next',
    'amo': 'Production',
}[site] %}

{% set site_url = {
    'pamo': 'https://addons.allizom.org',
    'namo': 'https://addons-next.allizom.org',
    'amo': 'https://addons.mozilla.org',
}[site] %}

{% set fifteen = "from=-15minutes&title=15 minutes" %}
{% set hour = "from=-1hours&title=1 hour" %}
{% set day = "from=-24hours&title=24 hours" %}
{% set week = "from=-7days&title=7 days" %}

{% macro grid() %}
  <img class="fifteen" src="{{ base }}&{{ caller()|trim }}&{{ fifteen }}">
  <img class="hour" src="{{ base }}&{{ caller()|trim }}&{{ hour }}">
  <img class="day" src="{{ base }}&{{ caller()|trim }}&{{ day }}">
  <img class="week" src="{{ base }}&{{ caller()|trim }}&{{ week }}">
{% endmacro %}

<!DOCTYPE html>
<html>
  <head>
    <title>Graphite for {{ site_name }}</title>
  </head>
  <body>
    <h1>Graphite for <a href="{{ site_url }}">{{ site_url }}</a></h1>
    <p>If you don't see pictures, you don't have LDAP authentication.</p>
    <ul>
      <li><a href="#responses">All Responses</a></li>
      <li><a href="#errors">Redirects and Errors</a></li>
      <li><a href="#celery">Celery</a></li>
      <li><a href="#blocklist">Blocklist Perf</a></li>
    </ul>

    <h2 id="responses">All Responses</h2>
    {% call grid() %}
      target=sumSeries%28{{ ns }}.response.*%29&target={{ ns }}.response.200&target={{ ns }}.response.301&target={{ ns }}.response.302&target={{ ns }}.response.403&target={{ ns }}.response.404&target={{ ns }}.response.405&target={{ ns }}.response.500
    {% endcall %}


    <h2 id="errors">Redirects and Errors</h2>
    {% call grid() %}
      target={{ ns }}.response.301&target={{ ns }}.response.302&target={{ ns }}.response.304&target={{ ns }}.response.400&target={{ ns }}.response.403&target={{ ns }}.response.404&target={{ ns }}.response.405&target={{ ns }}.response.500&target={{ ns }}.response.503
    {% endcall %}

    <h2 id="celery">Celery (<a href="{{ url('zadmin.celery') }}">details</a>)</h2>
    {% call grid() %}
      target=sumSeries({{ site }}.celery.tasks.pending.*.*.*)&target=nonNegativeDerivative(sumSeries({{ site }}.celery.tasks.total.*.*.*))&target=nonNegativeDerivative(sumSeries({{ site }}.celery.tasks.failed.*.*.*))
    {% endcall %}
    <h2 id="blocklist">Blocklist Perf</h2>
    {% call grid() %}
    &target=stats.timers.{{ site }}.view.api.views.guid_search.GET.lower&target=stats.timers.{{ site }}.view.api.views.guid_search.GET.mean&target=stats.timers.{{ site }}.view.api.views.guid_search.GET.upper_90&target=scale%28stats.timers.{{ site }}.view.api.views.guid_search.GET.count%2C%200.01%29
    {% endcall %}

    <script>
      /* Press `r` to only update the pictures that really need it. */
      var classes = {
        /* Map CSS class to [last updated, update threshold]. */
        fifteen: [new Date, 0],
        hour: [new Date, 30],
        day: [new Date, 60],
        week: [new Date, 600],
      }

      /* Remember the original src. */
      var imgs = document.querySelectorAll('img');
      for (var i = 0; i < imgs.length; i++) {
{'fraction_non_alphanumeric': 0.2411242603550296, 'fraction_numerical': 0.029585798816568046, 'mean_word_length': 3.5924528301886793, 'pattern_counts': {'":': 0, '<': 91, '<?xml version=': 0, '>': 89, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5438316', 'n_tokens_mistral': 2334, 'n_tokens_neox': 2149, 'n_words': 473}