@@ -276,14 +276,20 @@ def latency_table(pdf, bursts, data):
276
276
req_cnt = np .array (data ['Requests' ]["rd req cnt" ]).reshape (- 1 , 1 )
277
277
278
278
hist_arr = hist_arr / req_cnt
279
- offset = hist_x [1 ] - hist_x [0 ]
279
+ hist_arr = hist_arr .T
280
+
281
+ # Delete all empty rows
282
+ # But leave last one empty row for better visuals
283
+ while hist_arr .shape [0 ] > 0 and np .all (hist_arr [- 2 :] <= 0 ):
284
+ hist_arr = hist_arr [:- 1 ]
285
+ hist_x = hist_x [:- 1 ]
286
+
280
287
limits = (
281
288
min (burst_seq_b ), max (burst_seq_b ),
282
- min (data ['Values' ]['latency' ]['min' ]) - offset ,
283
- max (data ['Values' ]['latency' ]['max' ]) - offset
289
+ hist_x [0 ], hist_x [- 1 ]
284
290
)
285
291
286
- graph_gen .init_plots () # title="Read latency")
292
+ graph_gen .init_plots ()
287
293
graph_gen .basic_plot (burst_seq_b , [
288
294
data ['Values' ]['latency' ]["min" ],
289
295
data ['Values' ]['latency' ]["max" ],
@@ -293,15 +299,6 @@ def latency_table(pdf, bursts, data):
293
299
graph_gen .set_ylabel ("latency [ns]" )
294
300
graph_gen .plot_save (f"{ index } _latency_" + type )
295
301
296
- #zoom_burst = 0
297
- #x = list(data['latency']['hist_ns'].keys())
298
- #y = [i[zoom_burst] for i in data['latency']['hist_ns'].values()]
299
- #graph_gen.init_plots() #title="Read latency")
300
- #graph_gen.histogram_plot(x, [y], log=True)
301
- #graph_gen.set_xlabel("latency [ns]")
302
- #graph_gen.set_ylabel("occurrence")
303
- #graph_gen.plot_save(f"{index}_latency_" + type + f'_zoom_{zoom_burst}')
304
-
305
302
## Generate PDF ##
306
303
print_progress (progress , 'generating report' )
307
304
pdf .heading (1 , "Memory tester report" )
0 commit comments