예제 #1
0
def process(file_path, experiments):
	logger.info("Processing ...")
	jsons = logcat.logcat_parse(file_path, tag_pattern='AllYouCanMeasure-.*')

	last_idx = 0
	for expt in experiments:
		for measurement in expt.get_measurements():
			op = measurement.operation
			start_time = measurement.results.get(op + 'Begin', 0)
			end_time = measurement.results.get(op + 'End', 0)

			last_idx = add_info(measurement, jsons, last_idx, start_time, end_time)
예제 #2
0
def process(file_path, experiments):
    logger.info("Processing ...")
    jsons = logcat.logcat_parse(file_path, tag_pattern="IFSelect->MeasurementTask")

    experiment_number = 0
    for j in jsons:
        # powerSyncs are included in experiment logs
        if not j.get("experimentDurationUs", None):
            logger.debug("Skipping line due to no experimentDurationUs: %s" % (j))
            continue
            # If the object has key experimentDurationUs, then we have an experiment
        expt = parse_experiment(j, experiment_number)
        experiments.append(expt)
        experiment_number += 1