tools/python/google/gethash_timer.py
def RunTimedGetHash(period, samples=None):
  '''Runs an experiment to measure the amount of time it takes to receive
  multiple responses from the GetHash servers.

  Args:
    period:  A floating point value that indicates (in seconds) the delay
             between requests.
    samples: An integer value indicating the number of requests to make.
             If 'None', the test continues indefinitely.
  Returns:
    None.
  '''
  global g_file_handle
  prefix = '\x50\x61\x75\x6c'
  sample_count = 1
  while True:
    response_code, elapsed_time = TimedGetHash(prefix)
    LogResponse(sample_count, response_code, elapsed_time)
    sample_count += 1
    if samples is not None and sample_count == samples:
      break
    time.sleep(period)
Runs an experiment to measure the amount of time it takes to receive
  multiple responses from the GetHash servers.

  Args:
    period:  A floating point value that indicates (in seconds) the delay
             between requests.
    samples: An integer value indicating the number of requests to make.
             If 'None', the test continues indefinitely.
  Returns:
    None.
  
Runs an experiment to measure the amount of time it takes to receive
multiple responses from the GetHash servers.
Runs an experiment to measure the amount of time it takes to receive multiple responses from the GetHash servers .
def RunTimedGetHash(period, samples=None):
  global g_file_handle
  prefix = '\x50\x61\x75\x6c'
  sample_count = 1
  while True:
    response_code, elapsed_time = TimedGetHash(prefix)
    LogResponse(sample_count, response_code, elapsed_time)
    sample_count += 1
    if samples is not None and sample_count == samples:
      break
    time.sleep(period)
def RunTimedGetHash ( period , samples = None ) : global g_file_handle prefix = '\x50\x61\x75\x6c' sample_count = 1 while True : response_code , elapsed_time = TimedGetHash ( prefix ) LogResponse ( sample_count , response_code , elapsed_time ) sample_count += 1 if samples is not None and sample_count == samples : break time . sleep ( period )
Runs an experiment to measure the amount of time it takes to receive
multiple responses from the GetHash servers.
Runs an experiment to measure the amount of time it takes to receive multiple responses from the GetHash servers .
'''Runs an experiment to measure the amount of time it takes to receive
  multiple responses from the GetHash servers.

  Args:
    period:  A floating point value that indicates (in seconds) the delay
             between requests.
    samples: An integer value indicating the number of requests to make.
             If 'None', the test continues indefinitely.
  Returns:
    None.
  '''
None
period
A floating point value that indicates (in seconds) the delay
between requests.
A floating point value that indicates ( in seconds ) the delay between requests .
samples
An integer value indicating the number of requests to make.
If 'None', the test continues indefinitely.
An integer value indicating the number of requests to make . If ' None ' the test continues indefinitely .