Exemplo n.º 1
0
def prep_measurement(name, sonar_rtn):
    """Utility method to prepare a GripMeasurement

    Since all measurements from Sonar include the date of the analysis, we 
    encode the timestamp of that date for all measurements from this module

    Args:
        name - string containing the measurement name
        sonar_rtn - dictionary returned by Sonar for a given analysis result

    Returns:
        The extracted value
    """
    return make_measurement(name=name, value=get_val(sonar_rtn)
                            ,timestamp=GLOBALS['TIMESTAMP'])
Exemplo n.º 2
0
def defects_total(value, timestamp, metadata):
    return make_measurement(name="measurement.defects"
                            ,metadata=metadata
                            ,value=float(value)
                            ,timestamp=timestamp
                            )
Exemplo n.º 3
0
def requirements_added(value, timestamp, metadata):
    return make_measurement(name="measurement.requirements_added"
                            ,metadata=metadata
                            ,value=float(value)
                            ,timestamp=timestamp
                            )
Exemplo n.º 4
0
def defects_closed(timestamp, metadata):
    return make_measurement(name="measurement.defects_closed"
                            ,metadata=metadata
                            ,timestamp=timestamp
                            )