diff options
author | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2017-03-14 17:26:28 +0800 |
---|---|---|
committer | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2017-03-14 17:26:28 +0800 |
commit | 63c002a51ff072c911d3b89296b627b16983f5a0 (patch) | |
tree | 2ceeb00e4d566589fcd03436cea6ad1dee30798f /legacy/utils/transform/fio_transform.py | |
parent | 89743ab8134e54fe606310e3bf5c65ebab93c62a (diff) |
Remove legacy code from stable branch
Change-Id: I283f84dfcb3cd029739caaefb33ed5431114fae9
Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'legacy/utils/transform/fio_transform.py')
-rw-r--r-- | legacy/utils/transform/fio_transform.py | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/legacy/utils/transform/fio_transform.py b/legacy/utils/transform/fio_transform.py deleted file mode 100644 index e8de2f9a..00000000 --- a/legacy/utils/transform/fio_transform.py +++ /dev/null @@ -1,37 +0,0 @@ -############################################################################## -# Copyright (c) 2017 ZTE Corporation and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## -import json -import pickle -import os -import datetime - - -def get_fio_job_result(fio_job_data): - return {'read': {'io_bytes': fio_job_data["read"]["io_bytes"], - 'io_ps': fio_job_data["read"]["iops"], - 'io_runtime_millisec': fio_job_data["read"]["runtime"], - 'mean_io_latenchy_microsec': fio_job_data["read"]["lat"]["mean"]}, - 'write': {'io_bytes': fio_job_data["write"]["io_bytes"], - 'io_ps': fio_job_data["write"]["iops"], - 'io_runtime_millisec': fio_job_data["write"]["runtime"], - 'mean_io_latenchy_microsec': fio_job_data["write"]["lat"]["mean"]}} - - -with open("fio_result.json") as fio_raw: - fio_data = json.load(fio_raw) - -fio_result_dict = {} -for x, result in enumerate(map(get_fio_job_result, fio_data["jobs"])): - fio_result_dict['job_{0}'.format(x)] = result - -host_name = (os.popen("hostname").read().rstrip()) -report_time = str(datetime.datetime.utcnow().isoformat()) -os.system("mv fio_result.json " + str(host_name) + "-" + report_time + ".log") -with open('./result_temp', 'w + ')as out_fio_result: - pickle.dump(fio_result_dict, out_fio_result) |