diff --git a/tools/bazel_adb_run.py b/tools/bazel_adb_run.py index 95a7df2bc7b0755944819873c46ed523f3922944..675a20dd79ac9a8349ad6514204b78168724e778 100644 --- a/tools/bazel_adb_run.py +++ b/tools/bazel_adb_run.py @@ -33,10 +33,11 @@ def ops_benchmark_stdout_processor(stdout, device_properties, abi): line = line.strip() parts = line.split() if len(parts) == 5 and parts[0].startswith("BM_"): - metrics["%s.ops_benchmark_time_ms" % parts[0]] = str(float(parts[1])/1000000.0) - metrics["%s.ops_benchmark_input_mb_per_sec" % parts[0]] = parts[3] - metrics["%s.ops_benchmark_gmacc_per_sec" % parts[0]] = parts[4] - sh_commands.falcon_push_metrics(metrics, device_properties, abi) + metrics["%s.time_ms" % parts[0]] = str(float(parts[1])/1000000.0) + metrics["%s.input_mb_per_sec" % parts[0]] = parts[3] + metrics["%s.gmacc_per_sec" % parts[0]] = parts[4] + sh_commands.falcon_push_metrics(metrics, device_properties, abi, + endpoint="mace_ops_benchmark") def parse_args(): """Parses command line arguments.""" diff --git a/tools/sh_commands.py b/tools/sh_commands.py index e3d048334b6d75011890fce48e6e2d423a3894be..5483e4b3cb33a7c167f83fe173b3086be0eb74fa 100644 --- a/tools/sh_commands.py +++ b/tools/sh_commands.py @@ -138,7 +138,7 @@ def gen_mace_version(codegen_path="mace/codegen"): def falcon_tags(platform, model, abi): return "ro.board.platform=%s,ro.product.model=%s,abi=%s" % (platform, model, abi) -def falcon_push_metrics(metrics, device_properties, abi): +def falcon_push_metrics(metrics, device_properties, abi, endpoint="mace_dev"): cli = falcon_cli.FalconCli.connect(server="transfer.falcon.miliao.srv", port=8433, debug=False) @@ -147,7 +147,7 @@ def falcon_push_metrics(metrics, device_properties, abi): tags = falcon_tags(platform, model, abi) ts = int(time.time()) falcon_metrics = [{ - "endpoint": "mace_dev", + "endpoint": endpoint, "metric": key, "tags": tags, "timestamp": ts,