From 63c002a51ff072c911d3b89296b627b16983f5a0 Mon Sep 17 00:00:00 2001 From: Yujun Zhang Date: Tue, 14 Mar 2017 17:26:28 +0800 Subject: Remove legacy code from stable branch Change-Id: I283f84dfcb3cd029739caaefb33ed5431114fae9 Signed-off-by: Yujun Zhang --- legacy/utils/transform/ramspeed_transform.py | 49 ---------------------------- 1 file changed, 49 deletions(-) delete mode 100644 legacy/utils/transform/ramspeed_transform.py (limited to 'legacy/utils/transform/ramspeed_transform.py') diff --git a/legacy/utils/transform/ramspeed_transform.py b/legacy/utils/transform/ramspeed_transform.py deleted file mode 100644 index 9aa713ff..00000000 --- a/legacy/utils/transform/ramspeed_transform.py +++ /dev/null @@ -1,49 +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 os -import pickle -import datetime - -intmem_copy = os.popen("cat Intmem | grep 'BatchRun Copy' | awk '{print $4}'").read().rstrip() -intmem_scale = os.popen("cat Intmem | grep 'BatchRun Scale' | awk '{print $4}'").read().rstrip() -intmem_add = os.popen("cat Intmem | grep 'BatchRun Add' | awk '{print $4}'").read().rstrip() -intmem_triad = os.popen("cat Intmem | grep 'BatchRun Triad' | awk '{print $4}'").read().rstrip() -intmem_average = os.popen("cat Intmem | grep 'BatchRun AVERAGE' | awk '{print $4}'").read().rstrip() - -print intmem_copy -print intmem_average - -floatmem_copy = os.popen("cat Floatmem | grep 'BatchRun Copy' | awk '{print $4}'").read().rstrip() -floatmem_scale = os.popen("cat Floatmem | grep 'BatchRun Scale' | awk '{print $4}'").read().rstrip() -floatmem_add = os.popen("cat Floatmem | grep 'BatchRun Add' | awk '{print $4}'").read().rstrip() -floatmem_triad = os.popen("cat Floatmem | grep 'BatchRun Triad' | awk '{print $4}'").read().rstrip() -floatmem_average = os.popen("cat Floatmem | grep 'BatchRun AVERAGE' | awk '{print $4}'").read().rstrip() - -print floatmem_copy -print floatmem_average - -hostname = os.popen("hostname").read().rstrip() -time_stamp = str(datetime.datetime.utcnow().isoformat()) - -os.system("mv Intmem " + hostname + "-" + time_stamp + ".log") -os.system("cp Floatmem >> " + hostname + "-" + time_stamp + ".log") - -result = {"int_bandwidth": {"copy": intmem_copy, - "add": intmem_add, - "scale": intmem_scale, - "triad": intmem_triad, - "average": intmem_average}, - "float_bandwidth": {"copy": floatmem_copy, - "add": floatmem_add, - "scale": floatmem_scale, - "triad": floatmem_triad, - "average": floatmem_average}} - -with open('./result_temp', 'w+') as result_file: - pickle.dump(result, result_file) -- cgit 1.2.3-korg