Commit 4663f236 authored by jerrrrry's avatar jerrrrry
Browse files

Update plot.py

parent 67c38fb5
...@@ -24,7 +24,13 @@ def extract_values(df): ...@@ -24,7 +24,13 @@ def extract_values(df):
vals = [float(v) for v in df.iloc[idx].dropna().iloc[-5:] if str(v).replace('.', '').isdigit()] vals = [float(v) for v in df.iloc[idx].dropna().iloc[-5:] if str(v).replace('.', '').isdigit()]
if len(vals) != 5: if len(vals) != 5:
vals = [float(v) for v in df.iloc[-1].dropna().iloc[-5:] if str(v).replace('.', '').isdigit()] vals = [float(v) for v in df.iloc[-1].dropna().iloc[-5:] if str(v).replace('.', '').isdigit()]
return dict(zip(['total_throughput', 'generate_throughput', 'singel_road_generate_throughput', 'generate_throughput_without_ttft', 'ttft'], vals)) return {
"total_throughput": vals[4],
"generate_throughput": vals[3],
"singel_road_generate_throughput": vals[1],
"generate_throughput_without_ttft": vals[0],
"ttft": vals[2]
}
# ---------- 绘图 ---------- # ---------- 绘图 ----------
def draw_bar(data, labels, colors, title, out_path, xlabels): def draw_bar(data, labels, colors, title, out_path, xlabels):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment