<commit_before>#!/usr/bin/env bash
#
# DO NOT EDIT - This file is being maintained by Chef
#
# Based on: https://github.com/drolbr/Overpass-API/blob/way_based_areas/munin/osm_db_request_count

if [[ "$1" = "config" ]]; then
{
  echo 'graph_title API request count'
  echo 'graph_vlabel per minute'
  echo 'graph_category overpass'
  echo "overpass_request_started.label Base started"
  echo "overpass_request_started.type COUNTER"
  echo "overpass_request_started.cdef overpass_request_started,60,*"
  echo "overpass_request_started.max 10000"
  echo "overpass_request_completed.label Base completed"
  echo "overpass_request_completed.type COUNTER"
  echo "overpass_request_completed.cdef overpass_request_completed,60,*"
  echo "overpass_request_completed.max 10000"
  echo "overpass_area_request_started.label Area started"
  echo "overpass_area_request_started.type COUNTER"
  echo "overpass_area_request_started.cdef overpass_request_started,60,*"
  echo "overpass_area_request_started.max 10000"
  echo "overpass_area_request_completed.label Area completed"
  echo "overpass_area_request_completed.type COUNTER"
  echo "overpass_area_request_completed.cdef overpass_request_completed,60,*"
  echo "overpass_area_request_completed.max 10000"
  exit 0
}; fi

BASE_STATUS=`<%= @basedir %>/bin/dispatcher --osm-base --status | tr '\n' '|'`
AREA_STATUS=`<%= @basedir %>/bin/dispatcher --areas --status | tr '\n' '|'`

STARTED=`echo $BASE_STATUS | sed 's,.*Counter of started requests:,,;s:|.*::'`
echo "overpass_request_started.value $STARTED"

COMPLETED=`echo $BASE_STATUS | sed 's,.*Counter of finished requests:,,;s:|.*::'`
echo "overpass_request_completed.value $COMPLETED"
<commit_msg>overpass: fix diff computation variable in munin graph<commit_after>#!/usr/bin/env bash
#
# DO NOT EDIT - This file is being maintained by Chef
#
# Based on: https://github.com/drolbr/Overpass-API/blob/way_based_areas/munin/osm_db_request_count

if [[ "$1" = "config" ]]; then
{
  echo 'graph_title API request count'
  echo 'graph_vlabel per minute'
  echo 'graph_category overpass'
  echo "overpass_request_started.label Base started"
  echo "overpass_request_started.type COUNTER"
  echo "overpass_request_started.cdef overpass_request_started,60,*"
  echo "overpass_request_started.max 10000"
  echo "overpass_request_completed.label Base completed"
  echo "overpass_request_completed.type COUNTER"
  echo "overpass_request_completed.cdef overpass_request_completed,60,*"
  echo "overpass_request_completed.max 10000"
  echo "overpass_area_request_started.label Area started"
  echo "overpass_area_request_started.type COUNTER"
  echo "overpass_area_request_started.cdef overpass_area_request_started,60,*"
  echo "overpass_area_request_started.max 10000"
  echo "overpass_area_request_completed.label Area completed"
  echo "overpass_area_request_completed.type COUNTER"
  echo "overpass_area_request_completed.cdef overpass_area_request_completed,60,*"
  echo "overpass_area_request_completed.max 10000"
  exit 0
}; fi

BASE_STATUS=`<%= @basedir %>/bin/dispatcher --osm-base --status | tr '\n' '|'`
AREA_STATUS=`<%= @basedir %>/bin/dispatcher --areas --status | tr '\n' '|'`

STARTED=`echo $BASE_STATUS | sed 's,.*Counter of started requests:,,;s:|.*::'`
echo "overpass_request_started.value $STARTED"

COMPLETED=`echo $BASE_STATUS | sed 's,.*Counter of finished requests:,,;s:|.*::'`
echo "overpass_request_completed.value $COMPLETED"

{'fraction_non_alphanumeric': 0.11564229536848238, 'fraction_numerical': 0.01747742499271774, 'mean_word_length': 6.306382978723405, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '135909', 'n_tokens_mistral': 1274, 'n_tokens_neox': 1156, 'n_words': 247}