<commit_before>require_relative './base'

# Define the query command.
#
class WavefrontCommandQuery < WavefrontCommandBase
  def description
    'query the Wavefront API'
  end

  def _commands
    ["#{CMN} -g granularity -s time [-e time] [-f format] " \
           '[-ivO] [-S mode] [-N name] [-p points] <query>',
     "raw #{CMN} [-H host] [-s time] [-e time] [-f format] <metric>"]
  end

  def _options
    [common_options,
     '-g, --granularity=STRING  query granularity (d, h, m, or s)',
     '-s, --start=TIME          start of query window',
     '-e, --end=TIME            end of query window',
     '-N, --name=STRING         name identifying query',
     '-p, --points=INTEGER      maximum number of points to return',
     '-i, --inclusive           include matching series with no ' \
     'points inside the query window',
     '-v, --events              include events for matching series',
     '-S, --summarize=STRING    summarization strategy for bucketing ' \
     'points (mean, median, min, max, sum, count, last, first)',
     '-O, --obsolete            include metrics unreported for > 4 weeks',
     '-H, --host=STRING         host or source to query on',
     '-f, --format=STRING       output format']
  end
end
<commit_msg>no longer forced to specify g and s<commit_after>require_relative './base'

# Define the query command.
#
class WavefrontCommandQuery < WavefrontCommandBase
  def description
    'query the Wavefront API'
  end

  def _commands
    ["#{CMN} [-g granularity] [-s time] [-e time] [-f format] " \
           '[-ivO] [-S mode] [-N name] [-p points] <query>',
     "raw #{CMN} [-H host] [-s time] [-e time] [-f format] <metric>"]
  end

  def _options
    [common_options,
     '-g, --granularity=STRING  query granularity (d, h, m, or s)',
     '-s, --start=TIME          start of query window',
     '-e, --end=TIME            end of query window',
     '-N, --name=STRING         name identifying query',
     '-p, --points=INTEGER      maximum number of points to return',
     '-i, --inclusive           include matching series with no ' \
     'points inside the query window',
     '-v, --events              include events for matching series',
     '-S, --summarize=STRING    summarization strategy for bucketing ' \
     'points (mean, median, min, max, sum, count, last, first)',
     '-O, --obsolete            include metrics unreported for > 4 weeks',
     '-H, --host=STRING         host or source to query on',
     '-f, --format=STRING       output format']
  end
end

{'fraction_non_alphanumeric': 0.13812154696132597, 'fraction_numerical': 0.0007892659826361484, 'mean_word_length': 2.1846733668341707, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '911568', 'n_tokens_mistral': 762, 'n_tokens_neox': 747, 'n_words': 287}