From d0bfc9cceac2da55ca89e135f5983f207eba4415 Mon Sep 17 00:00:00 2001 From: Matthias Jung Date: Tue, 28 Feb 2017 21:05:24 +0100 Subject: [PATCH] Added outputs to plots.py for Matlab --- DRAMSys/analyzer/scripts/plots.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/DRAMSys/analyzer/scripts/plots.py b/DRAMSys/analyzer/scripts/plots.py index 8b7621a9..d5ae6cc0 100755 --- a/DRAMSys/analyzer/scripts/plots.py +++ b/DRAMSys/analyzer/scripts/plots.py @@ -83,6 +83,15 @@ def memory_utilisation_window(connection, tracePath, steps): plt.figure() + # Write data to a file for matlab: + outputFileNameBWMatlab = 'memory_utilization_percent_' + basename + '.txt' + + f = open(outputFileNameBWMatlab, 'w') + for i in range(steps): + line = "{} {}\n".format(time[i], bandwidthPercentage[i]) + f.write(line) + + #Plot Bandwidth in Percent plt.plot(time, bandwidthPercentage) plt.xlabel('Time [ns]')