<commit_before>title       "Requests Per Second"
area        :none
hide_legend true
vtitle      'reqs / sec'
description "API Requests as seen by stats.<%= @app_name %>.application.allRequests"

# In contrast to the stats.timers 'count' metrics, the ones in 'stats'
# (no '.timer') are automatically rescaled to per second frequency by
# estatsd, so we can just use them directly (contrast to the
# requests_per_second_by_endpoint.graph)

field :rate,
      :data => 'stats.<%= @app_name %>.application.allRequests'

# Alternatively, we can use the stats_counts.* version of the metric,
# which is stored at a reduced resolution.  However, it is NOT scaled
# down by estatsd, so we have to do that manually.
#
# I'm opting for keeping the higher-resolution data.
#
# field :rate,
#       :data => 'scale(stats_counts.<%= @app_name %>.application.allRequests, <%= @scaling_factor %>)'
<commit_msg>Add moving average to reqs/sec graph<commit_after>title       "<%= @app_name %> API Requests Per Second"
area        :none
hide_legend false
vtitle      'reqs / sec'
description "API Requests as seen by stats.<%= @app_name %>.application.allRequests"

# In contrast to the stats.timers 'count' metrics, the ones in 'stats'
# (no '.timer') are automatically rescaled to per second frequency by
# estatsd, so we can just use them directly (contrast to the
# requests_per_second_by_endpoint.graph)

field :rate,
      :data => 'stats.<%= @app_name %>.application.allRequests'

field :moving_average,
      :data => "movingAverage(stats.<%= @app_name %>.application.allRequests, 10)",
      :alias => "Moving Average (10 points)"

# Alternatively, we can use the stats_counts.* version of the metric,
# which is stored at a reduced resolution.  However, it is NOT scaled
# down by estatsd, so we have to do that manually.
#
# I'm opting for keeping the higher-resolution data.
#
# field :rate,
#       :data => 'scale(stats_counts.<%= @app_name %>.application.allRequests, <%= @scaling_factor %>)'

{'fraction_non_alphanumeric': 0.11658291457286432, 'fraction_numerical': 0.0020100502512562816, 'mean_word_length': 4.118251928020565, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 19, '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': '7315914', 'n_tokens_mistral': 627, 'n_tokens_neox': 594, 'n_words': 229}