<commit_before><!DOCTYPE html>
<!--
Copyright 2019 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel="import" href="/components/app-route/app-route.html">
<link rel="import" href="/elements/base-style.html">
<link rel="import" href="/elements/loading-wrapper.html">

<dom-module id="queue-stats-page">
  <template>
    <style include="base-style">
      td {
        text-align: center;
      }

      svg {
        fill: var(--paper-indigo-500);
        height: 56px;
        overflow: visible;
        width: 505px;
      }
    </style>
    <app-route route="{{route}}" pattern="/:configuration" data="{{routeData}}"></app-route>
    <h1>Queue Stats for [[routeData.configuration]]</h1>
    <loading-wrapper id="loading" auto="[[auto]]" response="{{stats}}">
      <table>
          <thead>
              <tr>
                  <th>Queued</th>
                  <th>Running</th>
              </tr>
          </thead>
          <tbody>
              <tr>
                  <td>[[jobs(stats, 'queued_jobs')]]</td>
                  <td>[[jobs(stats, 'running_jobs')]]</td>
              </tr>
          </tbody>
      </table>
      <h2>Queue Time Distribution (7 days)</h2>
      <p>This histogram shows the rough distribution of time (in hours)
          elements from the queue have been waiting to get scheduled. We
          store the last 7 days worth of time measurements.</p>
      <svg id="queueTimeDistribution"></svg>
      <h2>Queue Contents</h2>
      <ul>
        <template is="dom-repeat"
          items="{{stats.job_id_with_status}}" as="job">
          <li>
            <a href="/job/{{job.job_id}}">{{job.job_id}}</a> ({{job.status}})
          </li>
        </template>
      </ul>
    </loading-wrapper>
  </template>
  <script>
      'use strict';
      Polymer({
        is: 'queue-stats-page',
        properties: {
          auto: {
            type: Boolean,
            value: false
          },
          stats: {
            type: Object,
            observer: '_statsChanged',
          }
        },

        observers: [
          'routeChanged(route, routeData)',
        ],

        routeChanged(route, routeData) {<commit_msg>Reflect more useful information on the pinpoint device queue page<commit_after><!DOCTYPE html>
<!--
Copyright 2019 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel="import" href="/components/app-route/app-route.html">
<link rel="import" href="/elements/base-style.html">
<link rel="import" href="/elements/loading-wrapper.html">

<dom-module id="queue-stats-page">
  <template>
    <style include="base-style">
      td {
        text-align: center;
      }

      svg {
        fill: var(--paper-indigo-500);
        height: 56px;
        overflow: visible;
        width: 505px;
      }
    </style>
    <app-route route="{{route}}" pattern="/:configuration" data="{{routeData}}"></app-route>
    <h1>Queue Stats for [[routeData.configuration]]</h1>
    <loading-wrapper id="loading" auto="[[auto]]" response="{{stats}}">
      <table>
          <thead>
              <tr>
                  <th>Queued</th>
                  <th>Running</th>
              </tr>
          </thead>
          <tbody>
              <tr>
                  <td>[[jobs(stats, 'queued_jobs')]]</td>
                  <td>[[jobs(stats, 'running_jobs')]]</td>
              </tr>
          </tbody>
      </table>
      <h2>Queue Time Distribution (7 days)</h2>
      <p>This histogram shows the rough distribution of time (in hours)
          elements from the queue have been waiting to get scheduled. We
          store the last 7 days worth of time measurements.</p>
      <svg id="queueTimeDistribution"></svg>
      <h2>Queue Contents</h2>
      <ul>
        <template is="dom-repeat"
          items="{{stats.job_id_with_status}}" as="job">
          <li>
            <a href="/job/{{job.job_id}}">{{job.name}} for {{job.user}}</a> ({{job.status}})
          </li>
        </template>
      </ul>
    </loading-wrapper>
  </template>
  <script>
      'use strict';
      Polymer({
        is: 'queue-stats-page',
        properties: {
          auto: {
            type: Boolean,
            value: false
          },
          stats: {
            type: Object,
            observer: '_statsChanged',
          }
        },

        observers: [
          'routeChanged(route, routeData)',
        ],

        routeChanged(route, routeData) {
{'fraction_non_alphanumeric': 0.15503370297890845, 'fraction_numerical': 0.008697542944118286, 'mean_word_length': 1.8767979987492183, 'pattern_counts': {'":': 0, '<': 105, '<?xml version=': 0, '>': 105, 'https://': 0, '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': '529536', 'n_tokens_mistral': 1404, 'n_tokens_neox': 1336, 'n_words': 329}