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'])
def defects_total(value, timestamp, metadata): return make_measurement(name="measurement.defects" ,metadata=metadata ,value=float(value) ,timestamp=timestamp )
def requirements_added(value, timestamp, metadata): return make_measurement(name="measurement.requirements_added" ,metadata=metadata ,value=float(value) ,timestamp=timestamp )
def defects_closed(timestamp, metadata): return make_measurement(name="measurement.defects_closed" ,metadata=metadata ,timestamp=timestamp )