grr/server/grr_response_server/stats_store.py
def _GenerateStatsEntryForSingleDimensionalMetric(
    process_id, metric_name, metadata,
    timestamp):
  """Generates a StatsStoreEntry for the given single-dimensional metric.

  Args:
    process_id: Process identifier to use for for the generated entry.
    metric_name: Name of the single-dimensional metric.
    metadata: MetricMetadata for the metric.
    timestamp: Timestamp to use for the generated entry.

  Returns:
     A StatsStoreEntry containing the current value of the metric.
  """
  raw_metric_value = stats_collector_instance.Get().GetMetricValue(metric_name)
  metric_value = stats_values.StatsStoreValue()
  metric_value.SetValue(raw_metric_value, metadata.value_type)
  return stats_values.StatsStoreEntry(
      process_id=process_id,
      metric_name=metric_name,
      metric_value=metric_value,
      timestamp=timestamp)
Generates a StatsStoreEntry for the given single-dimensional metric.

  Args:
    process_id: Process identifier to use for for the generated entry.
    metric_name: Name of the single-dimensional metric.
    metadata: MetricMetadata for the metric.
    timestamp: Timestamp to use for the generated entry.

  Returns:
     A StatsStoreEntry containing the current value of the metric.
  
Generates a StatsStoreEntry for the given single-dimensional metric.
Generates a StatsStoreEntry for the given single - dimensional metric .
def _GenerateStatsEntryForSingleDimensionalMetric(
    process_id, metric_name, metadata,
    timestamp):
  raw_metric_value = stats_collector_instance.Get().GetMetricValue(metric_name)
  metric_value = stats_values.StatsStoreValue()
  metric_value.SetValue(raw_metric_value, metadata.value_type)
  return stats_values.StatsStoreEntry(
      process_id=process_id,
      metric_name=metric_name,
      metric_value=metric_value,
      timestamp=timestamp)
def _GenerateStatsEntryForSingleDimensionalMetric ( process_id , metric_name , metadata , timestamp ) : raw_metric_value = stats_collector_instance . Get ( ) . GetMetricValue ( metric_name ) metric_value = stats_values . StatsStoreValue ( ) metric_value . SetValue ( raw_metric_value , metadata . value_type ) return stats_values . StatsStoreEntry ( process_id = process_id , metric_name = metric_name , metric_value = metric_value , timestamp = timestamp )
Generates a StatsStoreEntry for the given single-dimensional metric.
Generates a StatsStoreEntry for the given single - dimensional metric .
"""Generates a StatsStoreEntry for the given single-dimensional metric.

  Args:
    process_id: Process identifier to use for for the generated entry.
    metric_name: Name of the single-dimensional metric.
    metadata: MetricMetadata for the metric.
    timestamp: Timestamp to use for the generated entry.

  Returns:
     A StatsStoreEntry containing the current value of the metric.
  """
A StatsStoreEntry containing the current value of the metric.
A StatsStoreEntry containing the current value of the metric .
process_id
Process identifier to use for for the generated entry.
Process identifier to use for for the generated entry .
metric_name
Name of the single-dimensional metric.
Name of the single - dimensional metric .
metadata
MetricMetadata for the metric.
MetricMetadata for the metric .
timestamp
Timestamp to use for the generated entry.
Timestamp to use for the generated entry .