Skip to content

Commit 5385917

Browse files
author
David Scott
committed
xenvm benchmark: output a gnuplot command file
It's possible to draw a graph by loading 'benchmark.gp' into gnuplot (e.g. 'load "benchmark.gp"' at the interactive prompt) Signed-off-by: David Scott <[email protected]>
1 parent c775287 commit 5385917

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

xenvm/xenvm.ml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,13 @@ let benchmark copts (vg_name,_) volumes threads =
230230
List.iter (fun (n, t) -> Printf.fprintf oc "%d %f\n" (volumes + n) t) (List.rev !times);
231231
Printf.fprintf oc "# %d destroys in %.1f s\n" volumes time;
232232
Printf.fprintf oc "# Average %.1f /sec\n" (float_of_int volumes /. time);
233+
close_out oc;
234+
let oc = open_out "benchmark.gp" in
235+
Printf.fprintf oc "set xlabel \"LV number\"\n";
236+
Printf.fprintf oc "set ylabel \"Time/seconds\"\n";
237+
Printf.fprintf oc "set title \"Creating and then destroying 1000 LVs\"\n";
238+
Printf.fprintf oc "plot \"benchmark.dat\" with points\n";
239+
close_out oc;
233240
return () in
234241
Lwt_main.run t
235242

0 commit comments

Comments
 (0)