grr/core/grr_response_core/stats/stats_utils.py
def CreateCounterMetadata(metric_name, fields=None, docstring=None, units=None):
  """Helper function for creating MetricMetadata for counter metrics."""
  return rdf_stats.MetricMetadata(
      varname=metric_name,
      metric_type=rdf_stats.MetricMetadata.MetricType.COUNTER,
      value_type=rdf_stats.MetricMetadata.ValueType.INT,
      fields_defs=FieldDefinitionProtosFromTuples(fields or []),
      docstring=docstring,
      units=units)
Helper function for creating MetricMetadata for counter metrics.
Helper function for creating MetricMetadata for counter metrics.
Helper function for creating MetricMetadata for counter metrics .
def CreateCounterMetadata(metric_name, fields=None, docstring=None, units=None):
  return rdf_stats.MetricMetadata(
      varname=metric_name,
      metric_type=rdf_stats.MetricMetadata.MetricType.COUNTER,
      value_type=rdf_stats.MetricMetadata.ValueType.INT,
      fields_defs=FieldDefinitionProtosFromTuples(fields or []),
      docstring=docstring,
      units=units)
def CreateCounterMetadata ( metric_name , fields = None , docstring = None , units = None ) : return rdf_stats . MetricMetadata ( varname = metric_name , metric_type = rdf_stats . MetricMetadata . MetricType . COUNTER , value_type = rdf_stats . MetricMetadata . ValueType . INT , fields_defs = FieldDefinitionProtosFromTuples ( fields or [ ] ) , docstring = docstring , units = units )
Helper function for creating MetricMetadata for counter metrics.
Helper function for creating MetricMetadata for counter metrics .
"""Helper function for creating MetricMetadata for counter metrics."""
metric_name
fields
docstring
units