<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 src="{{ base }}&{{ caller()|trim }}&{{ fifteen }}">
  <img src="{{ base }}&{{ caller()|trim }}&{{ hour }}">
  <img src="{{ base }}&{{ caller()|trim }}&{{ day }}">
  <img src="{{ base }}&{{ caller()|trim }}&{{ week }}">
{% endmacro %}

<!DOCTYPE html>
<html>
  <head>
    <title>Graphite for {{ site_name }}</title>
  </head>
  <body>
    <h1>Grahpite 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=sumSeries({{ site }}.celery.tasks.failed.*.*.*)&target=derivative(sumSeries({{ site }}.celery.tasks.total.*.*.*))
    {% endcall %}
  </body>
</html><commit_msg>use a derivative for tracking failures<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 src="{{ base }}&{{ caller()|trim }}&{{ fifteen }}">
  <img src="{{ base }}&{{ caller()|trim }}&{{ hour }}">
  <img src="{{ base }}&{{ caller()|trim }}&{{ day }}">
  <img src="{{ base }}&{{ caller()|trim }}&{{ week }}">
{% endmacro %}

<!DOCTYPE html>
<html>
  <head>
    <title>Graphite for {{ site_name }}</title>
  </head>
  <body>
    <h1>Grahpite 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=derivative(sumSeries({{ site }}.celery.tasks.total.*.*.*))&target=derivative(sumSeries({{ site }}.celery.tasks.failed.*.*.*))
    {% endcall %}
  </body>
</html>
{'fraction_non_alphanumeric': 0.2660925726587729, 'fraction_numerical': 0.03186221743810549, 'mean_word_length': 3.9743040685224837, 'pattern_counts': {'":': 0, '<': 85, '<?xml version=': 0, '>': 85, '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': '5818838', 'n_tokens_mistral': 1846, 'n_tokens_neox': 1691, 'n_words': 346}