From dd8aca5a7f011550d1b88b8ed502c9036fc2808b Mon Sep 17 00:00:00 2001 From: Michael Reuscher <michael.reuscher@desy.de> Date: Mon, 17 Jul 2023 17:25:05 +0200 Subject: [PATCH] new plot --- simrunner/data_config.json | 54 +++++++++++++++++++++++++ visualizer/visualizer/SeabornPlotter.py | 30 ++++++++++---- 2 files changed, 77 insertions(+), 7 deletions(-) diff --git a/simrunner/data_config.json b/simrunner/data_config.json index 12acd96..c57965e 100644 --- a/simrunner/data_config.json +++ b/simrunner/data_config.json @@ -64,5 +64,59 @@ "-n": "100", "-s": "12M", "-i": "0.1s", + "-N": "4"}, + "data_set_12":{ + "--posixDataDir": "protokoll", + "-n": "100", + "-s": "600", + "-i": "0.1s", + "-N": "4"}, + "data_set_13":{ + "--posixDataDir": "protokoll", + "-n": "100", + "-s": "1200", + "-i": "0.1s", + "-N": "4"}, + "data_set_14":{ + "--posixDataDir": "protokoll", + "-n": "100", + "-s": "2400", + "-i": "0.1s", + "-N": "4"}, + "data_set_15":{ + "--posixDataDir": "protokoll", + "-n": "100", + "-s": "4800", + "-i": "0.1s", + "-N": "4"}, + "data_set_16":{ + "--posixDataDir": "protokoll", + "-n": "100", + "-s": "9600", + "-i": "0.1s", + "-N": "4"}, + "data_set_17":{ + "--posixDataDir": "protokoll", + "-n": "100", + "-s": "60000", + "-i": "0.1s", + "-N": "4"}, + "data_set_18":{ + "--posixDataDir": "protokoll", + "-n": "100", + "-s": "120000", + "-i": "0.1s", + "-N": "4"}, + "data_set_19":{ + "--posixDataDir": "protokoll", + "-n": "100", + "-s": "240000", + "-i": "0.1s", + "-N": "4"}, + "data_set_20":{ + "--posixDataDir": "protokoll", + "-n": "100", + "-s": "480000", + "-i": "0.1s", "-N": "4"} } \ No newline at end of file diff --git a/visualizer/visualizer/SeabornPlotter.py b/visualizer/visualizer/SeabornPlotter.py index 35cf48d..2c3eb5f 100644 --- a/visualizer/visualizer/SeabornPlotter.py +++ b/visualizer/visualizer/SeabornPlotter.py @@ -1,7 +1,9 @@ import numpy as np import matplotlib.pyplot as plt import seaborn as sns +import pandas as pd from scipy.stats import iqr +sns.set_theme() class SeabornPlotter: @@ -10,19 +12,26 @@ class SeabornPlotter: self.name = name self.current_plot = None + def configure_plot(self, ax): + #ax.set_xscale('log') + if self.name == "idle" or self.name == "wait": + ax.set_yscale('symlog', linthresh=0.1) + + + else: + ax.set_yscale('log') + + def plot(self): df = self.dataframe x = df['size'] y = df['duration'] title = "Procedure: {}".format(self.name) - f, ax = plt.subplots(figsize=(16, 9)) - sns.violinplot(x=x, y=y, s=5, color=".15", palette="light:b", cut=0, inner="points", - hue=list(self.dataframe.index.get_level_values(0))) - if self.name == "dump" or self.name == "write" or self.name == "open" or self.name == "wait": - ax.set_yscale('symlog', linthresh=0.1) - else: - ax.set_yscale('log') + f, ax = plt.subplots(figsize=(32, 18)) + sns.boxplot(x=x, y=y, color=".15", palette="light:b") + + self.configure_plot(ax) plt.title(title) plt.xlabel("Size of written data in ms") @@ -31,3 +40,10 @@ class SeabornPlotter: plt.show() + + + + + + + -- GitLab