From f56e0556af674a730bf1545de5ceae2fc467bf3e Mon Sep 17 00:00:00 2001 From: Liangliang He Date: Wed, 25 Apr 2018 14:00:23 +0800 Subject: [PATCH] Improve mace tools output --- tools/mace_tools.py | 2 +- tools/sh_commands.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/mace_tools.py b/tools/mace_tools.py index f475374e..13452dd8 100644 --- a/tools/mace_tools.py +++ b/tools/mace_tools.py @@ -558,7 +558,7 @@ def main(unused_args): print( "====================================================" ) - print("Trying to lock device", serialno) + print("Trying to lock device %s" % serialno) with sh_commands.device_lock(serialno): print("Run on device: %s, %s, %s" % ( serialno, props["ro.board.platform"], diff --git a/tools/sh_commands.py b/tools/sh_commands.py index 327044a4..8817dd93 100644 --- a/tools/sh_commands.py +++ b/tools/sh_commands.py @@ -46,7 +46,7 @@ def strip_invalid_utf8(str): def make_output_processor(buff): def process_output(line): - print(line.strip()) + print(line.rstrip()) buff.append(line) return process_output @@ -189,7 +189,7 @@ def adb_run(serialno, print( "=====================================================================" ) - print("Trying to lock device", serialno) + print("Trying to lock device %s" % serialno) with device_lock(serialno): print("Run on device: %s, %s, %s" % (serialno, props["ro.board.platform"], @@ -1058,7 +1058,7 @@ def falcon_push_metrics(metrics, endpoint="mace_dev", tags={}): "tags": falcon_tags(tags), "timestamp": ts, "value": value, - "step": 86400, + "step": 600, "counterType": "GAUGE" } for key, value in metrics.iteritems()] cli.update(falcon_metrics) -- GitLab