diff options
author | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2017-01-21 22:30:05 +0800 |
---|---|---|
committer | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2017-01-31 23:23:52 +0800 |
commit | eac3701e474623103ac10d8238b5e406355a0724 (patch) | |
tree | 8e159bd5bb2c186fcb8c99632a7c68a83f1cd5f6 /tests/profiler-poc.py | |
parent | c9d0d2c9fc16f2e989444bc4d7d8fab8060433ba (diff) |
Fix bugs in profiler
- collect disable_network.log
- use Python oneliner instead of `bc`
- rename T00 from hostdown to linkdown
- add step collect_logs
- move profiler to a dedicated step
- reorder function definitions to elimate warning on unresolved variable
- redirect also stderr to log
JIRA: DOCTOR-94
Change-Id: Ic63e5163945c5b21fd1d1c0bf99be353c11c2ada
Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'tests/profiler-poc.py')
-rw-r--r-- | tests/profiler-poc.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/profiler-poc.py b/tests/profiler-poc.py index 71034781..408cb09a 100644 --- a/tests/profiler-poc.py +++ b/tests/profiler-poc.py @@ -21,7 +21,7 @@ See also: https://goo.gl/98Osig import json import os -LOGFILE = 'performance-profile' +OUTPUT = 'doctor_profiling_output' PREFIX = 'DOCTOR_PROFILER' TOTAL_CHECK_POINTS = 10 MODULE_CHECK_POINTS = ['T00', 'T01', 'T04', 'T05', 'T06', 'T09'] @@ -33,7 +33,7 @@ Total time cost: {total}(ms) |Monitor|Inspector |Controller|Notifier|Evaluator | |{M00} |{M01} |{M02} |{M03} |{M04} | | | | | | | | | | | -host down:{T00}| | | | | | | | | +link down:{T00}| | | | | | | | | raw failure:{T01}| | | | | | | | found affected:{T02}| | | | | | | set VM error:{T03}| | | | | | @@ -78,7 +78,7 @@ def main(): profile = TEMPLATE.format(**tags) - logfile = open('{}.json'.format(LOGFILE), 'w') + logfile = open('{}.json'.format(OUTPUT), 'w') logfile.write(json.dumps(tags)) print profile |