grr/server/grr_response_server/stats_store.py
def _WriteStats(process_id,
                timestamp = None):
  """Writes current values for all defined metrics to the DB.

  Args:
    process_id: String identifier for the process for which to dump metrics.
    timestamp: Timestamp to use for the written data. If not provided, all
      entries written will use the current timestamp.
  """
  if _ShouldUseRelationalDB():
    stats_entries = _GenerateStatsEntries(process_id, timestamp=timestamp)
    logging.info("Writing %d stats entries to the DB.", len(stats_entries))
    data_store.REL_DB.WriteStatsStoreEntries(stats_entries)
  else:
    aff4_stats_store.STATS_STORE.WriteStats(
        process_id=process_id, timestamp=timestamp)
Writes current values for all defined metrics to the DB.

  Args:
    process_id: String identifier for the process for which to dump metrics.
    timestamp: Timestamp to use for the written data. If not provided, all
      entries written will use the current timestamp.
  
Writes current values for all defined metrics to the DB.
Writes current values for all defined metrics to the DB .
def _WriteStats(process_id,
                timestamp = None):
  if _ShouldUseRelationalDB():
    stats_entries = _GenerateStatsEntries(process_id, timestamp=timestamp)
    logging.info("Writing %d stats entries to the DB.", len(stats_entries))
    data_store.REL_DB.WriteStatsStoreEntries(stats_entries)
  else:
    aff4_stats_store.STATS_STORE.WriteStats(
        process_id=process_id, timestamp=timestamp)
def _WriteStats ( process_id , timestamp = None ) : if _ShouldUseRelationalDB ( ) : stats_entries = _GenerateStatsEntries ( process_id , timestamp = timestamp ) logging . info ( "Writing %d stats entries to the DB." , len ( stats_entries ) ) data_store . REL_DB . WriteStatsStoreEntries ( stats_entries ) else : aff4_stats_store . STATS_STORE . WriteStats ( process_id = process_id , timestamp = timestamp )
Writes current values for all defined metrics to the DB.
Writes current values for all defined metrics to the DB .
"""Writes current values for all defined metrics to the DB.

  Args:
    process_id: String identifier for the process for which to dump metrics.
    timestamp: Timestamp to use for the written data. If not provided, all
      entries written will use the current timestamp.
  """
process_id
String identifier for the process for which to dump metrics.
String identifier for the process for which to dump metrics .
timestamp
Timestamp to use for the written data. If not provided, all
entries written will use the current timestamp.
Timestamp to use for the written data . If not provided all entries written will use the current timestamp .