<commit_before># coding=utf-8
"""
© 2013 LinkedIn Corp. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
 
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
"""
import datetime
import logging
import os
import sys
import threading

from naarad.metrics.metric import Metric
import naarad.utils

logger = logging.getLogger('naarad.metrics.GCMetric')

class GCMetric(Metric):
  """ Class for GC logs, deriving from class Metric """
  clock_format = '%Y-%m-%d %H:%M:%S'
  rate_types = ()
  val_types = ('alloc', 'promo', 'used0', 'used1', 'used', 'commit0', 'commit1', 'commit', 'gen0', 'gen0t', 'gen0usr', 'gen0sys',
      'cmsIM', 'cmsRM', 'cmsRS', 'GC', 'cmsCM', 'cmsCP', 'cmsCS', 'cmsCR', 'safept', 'apptime')
<<<<<<< HEAD
  def __init__ (self, metric_type, infile, hostname, outdir, label, ts_start, ts_end, **other_options):
    Metric.__init__(self, metric_type, infile, hostname, outdir, label, ts_start, ts_end)
=======
  def __init__ (self, metric_type, infile, access, outdir, label, ts_start, ts_end, **other_options):
    Metric.__init__(self, metric_type, infile, access, outdir, label, ts_start, ts_end)
    # TODO: Make this list configurable
    important_sub_metrics = ('GC', 'used')
>>>>>>> upstream/master
    for (key, val) in other_options.iteritems():
      if key == 'gc-options':
        self.gc_options = val.split()<commit_msg>removed some error lines.<commit_after># coding=utf-8
"""
© 2013 LinkedIn Corp. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
 
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
"""
import datetime
import logging
import os
import sys
import threading

from naarad.metrics.metric import Metric
import naarad.utils

logger = logging.getLogger('naarad.metrics.GCMetric')

class GCMetric(Metric):
  """ Class for GC logs, deriving from class Metric """
  clock_format = '%Y-%m-%d %H:%M:%S'
  rate_types = ()
  val_types = ('alloc', 'promo', 'used0', 'used1', 'used', 'commit0', 'commit1', 'commit', 'gen0', 'gen0t', 'gen0usr', 'gen0sys',
      'cmsIM', 'cmsRM', 'cmsRS', 'GC', 'cmsCM', 'cmsCP', 'cmsCS', 'cmsCR', 'safept', 'apptime')
  def __init__ (self, metric_type, infile, hostname, outdir, label, ts_start, ts_end, **other_options):
    Metric.__init__(self, metric_type, infile, hostname, outdir, label, ts_start, ts_end)
  def __init__ (self, metric_type, infile, access, outdir, label, ts_start, ts_end, **other_options):
    Metric.__init__(self, metric_type, infile, access, outdir, label, ts_start, ts_end)
    # TODO: Make this list configurable
    important_sub_metrics = ('GC', 'used')
    for (key, val) in other_options.iteritems():
      if key == 'gc-options':
        self.gc_options = val.split()
{'fraction_non_alphanumeric': 0.13645864437145416, 'fraction_numerical': 0.01015228426395939, 'mean_word_length': 4.826086956521739, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2623982', 'n_tokens_mistral': 1107, 'n_tokens_neox': 1062, 'n_words': 372}