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