summaryrefslogtreecommitdiff
path: root/tools/monit_stream
diff options
context:
space:
mode:
authorQiuwen Lu <[email protected]>2017-09-19 18:35:08 +0800
committerQiuwen Lu <[email protected]>2017-09-19 18:35:08 +0800
commit4f23b34d4b53d8e7086954e8656f6a8e913b5cda (patch)
tree04802cc15aeee1a921cfeac7bf05c57c83465d59 /tools/monit_stream
parent2b9b23b50e15ef9ab8c4ab84987c0044e600b82f (diff)
修正monit_stream显示计数的Bugv4.2.18-20170919
- 原实现在计算单设备RX/TX总和时,显示的是第一线程的RX/TX数量。现修正; - 去除遗留的调试信息打印。
Diffstat (limited to 'tools/monit_stream')
-rw-r--r--tools/monit_stream/monit_stream.py24
1 files changed, 11 insertions, 13 deletions
diff --git a/tools/monit_stream/monit_stream.py b/tools/monit_stream/monit_stream.py
index 6c3fea0..7d343d8 100644
--- a/tools/monit_stream/monit_stream.py
+++ b/tools/monit_stream/monit_stream.py
@@ -85,18 +85,18 @@ def dump_summary_table(json_fp, appsym, devsym, title_vector_rx, title_vector_tx
for stream_id in range(max(nr_rxstream, nr_txstream)):
ValueList = []
- for item in title_vector_rx:
- value = __rd_function(json_fp, devsym, TITLE_MAP[item])[stream_id] \
- if stream_id < nr_rxstream else 0
- ValueList.append(value)
+ for item in title_vector_rx:
+ value = __rd_function(json_fp, devsym, TITLE_MAP[item])[stream_id] \
+ if stream_id < nr_rxstream else 0
+ ValueList.append(value)
- for item in title_vector_tx:
- value = __rd_function(json_fp, devsym, TITLE_MAP[item])[stream_id] \
- if stream_id < nr_txstream else 0
- ValueList.append(value)
+ for item in title_vector_tx:
+ value = __rd_function(json_fp, devsym, TITLE_MAP[item])[stream_id] \
+ if stream_id < nr_txstream else 0
+ ValueList.append(value)
- for i,v in enumerate(ValueList):
- ValueListSum[i] += v
+ for i,v in enumerate(ValueList):
+ ValueListSum[i] += v
return ValueListSum
@@ -111,6 +111,7 @@ def dump_summary_table(json_fp, appsym, devsym, title_vector_rx, title_vector_tx
for dev in devsym:
ValueListSum = __dump_one_device(json_fp, dev, title_vector_rx, title_vector_tx, speed)
+
for i,v in enumerate(ValueListSum):
ValueListTotal[i] += v
@@ -245,9 +246,6 @@ def main():
if 'ftx' in r_option.metrics:
title_vector_tx.extend(TITLE_VECTOR_FTX)
- print title_vector_rx
- print title_vector_tx
-
try:
while True: