@@ -29,6 +29,9 @@ def plotter(args):
29
29
30
30
df = pd .read_csv (args .csv_filepath )
31
31
telemetry_modes_y_data = {}
32
+ if not args .telemetry_modes :
33
+ args .telemetry_modes = df ["Labels" ].unique ()
34
+
32
35
metric_name = get_metric_name (args )
33
36
constructed_query_str = get_constructed_query_str (args )
34
37
@@ -40,7 +43,7 @@ def plotter(args):
40
43
plt .figure (figsize = (1138 / dpi , 871 / dpi ), dpi = dpi )
41
44
fig = plt .figure (figsize = (1138 / dpi , 871 / dpi ), dpi = dpi )
42
45
ax = fig .add_subplot (111 )
43
- ax .set_ylim (0 , 1.0 )
46
+ # ax.set_ylim(0, 1.0)
44
47
for key , val in telemetry_modes_y_data .items ():
45
48
plot_key = key
46
49
match key :
@@ -107,15 +110,15 @@ def get_data_helper(df, query_list, query_str, telemetry_mode, metric_name):
107
110
try :
108
111
data [metric_name ].head ().empty
109
112
except KeyError as e :
110
- y_series_data .append (None )
113
+ y_series_data .append (0 )
111
114
else :
112
115
if not data [metric_name ].head ().empty :
113
116
if metric_name .startswith ('cpu' ) or metric_name .startswith ('mem' ):
114
117
y_series_data .append (data [metric_name ].head (1 ).values [0 ])
115
118
else :
116
- y_series_data .append (data [metric_name ].head (1 ).values [0 ] / data [ "ActualQPS" ]. head ( 1 ). values [ 0 ] )
119
+ y_series_data .append (data [metric_name ].head (1 ).values [0 ] / 1000 )
117
120
else :
118
- y_series_data .append (None )
121
+ y_series_data .append (0 )
119
122
120
123
return y_series_data
121
124
@@ -174,7 +177,8 @@ def get_parser():
174
177
parser .add_argument (
175
178
"--query_str" ,
176
179
help = "Specify the qps or conn query_str that will be used to query your y-axis data based on the CSV file."
177
- "For example: conn_query_str=ActualQPS==1000, qps_query_str=NumThreads==16."
180
+ "For example: conn_query_str=ActualQPS==1000, qps_query_str=NumThreads==16." ,
181
+ default = ""
178
182
)
179
183
parser .add_argument (
180
184
"--csv_filepath" ,
0 commit comments