tools/perf/page_sets/press_story.py
def AddJavaScriptMeasurement(self, name, unit, code, **kwargs):
    """Run some JavaScript to obtain and record an ad-hoc measurements.

    Args:
      name: A string with the name of the measurement (e.g. 'score', 'runtime',
        etc).
      unit: A string specifying the unit used for measurements (e.g. 'ms',
        'count', etc).
      code: A piece of JavaScript code to run on the current tab, it must
        return either a single or a list of numeric values. These are the
        values for the measurement to be recorded.
      description: An optional string with a short human readable description
        of the measurement.
      Other keyword arguments provide values to be interpolated within
          the JavaScript code. See telemetry.util.js_template for details.
    """
    description = kwargs.pop('description', None)
    samples = self._action_runner.EvaluateJavaScript(code, **kwargs)
    self.AddMeasurement(name, unit, samples, description)
Run some JavaScript to obtain and record an ad-hoc measurements.

    Args:
      name: A string with the name of the measurement (e.g. 'score', 'runtime',
        etc).
      unit: A string specifying the unit used for measurements (e.g. 'ms',
        'count', etc).
      code: A piece of JavaScript code to run on the current tab, it must
        return either a single or a list of numeric values. These are the
        values for the measurement to be recorded.
      description: An optional string with a short human readable description
        of the measurement.
      Other keyword arguments provide values to be interpolated within
          the JavaScript code. See telemetry.util.js_template for details.
    
Run some JavaScript to obtain and record an ad-hoc measurements.
Args:
name: A string with the name of the measurement .
unit: A string specifying the unit used for measurements .
code: A piece of JavaScript code to run on the current tab, it must
return either a single or a list of numeric values. These are the
values for the measurement to be recorded.
description: An optional string with a short human readable description
of the measurement.
Other keyword arguments provide values to be interpolated within
the JavaScript code.
Run some JavaScript to obtain and record an ad - hoc measurements . Args : name : A string with the name of the measurement . unit : A string specifying the unit used for measurements . code : A piece of JavaScript code to run on the current tab it must return either a single or a list of numeric values . These are the values for the measurement to be recorded . description : An optional string with a short human readable description of the measurement . Other keyword arguments provide values to be interpolated within the JavaScript code .
def AddJavaScriptMeasurement(self, name, unit, code, **kwargs):
    description = kwargs.pop('description', None)
    samples = self._action_runner.EvaluateJavaScript(code, **kwargs)
    self.AddMeasurement(name, unit, samples, description)
def AddJavaScriptMeasurement ( self , name , unit , code , ** kwargs ) : description = kwargs . pop ( 'description' , None ) samples = self . _action_runner . EvaluateJavaScript ( code , ** kwargs ) self . AddMeasurement ( name , unit , samples , description )
Run some JavaScript to obtain and record an ad-hoc measurements.
Run some JavaScript to obtain and record an ad - hoc measurements .
"""Run some JavaScript to obtain and record an ad-hoc measurements.

    Args:
      name: A string with the name of the measurement (e.g. 'score', 'runtime',
        etc).
      unit: A string specifying the unit used for measurements (e.g. 'ms',
        'count', etc).
      code: A piece of JavaScript code to run on the current tab, it must
        return either a single or a list of numeric values. These are the
        values for the measurement to be recorded.
      description: An optional string with a short human readable description
        of the measurement.
      Other keyword arguments provide values to be interpolated within
          the JavaScript code. See telemetry.util.js_template for details.
    """
self
name
unit
code