Skip to content
This repository
Browse code

Minor visualizer fixes.

- Replace underscores with spaces for axis legends.
- Use absolute paths when copying webpage support files.
  • Loading branch information...
commit 28eb69da5ab727a9ba911eab3e5a57848ecc6cc7 1 parent fc8e0aa
Benjamin Tovar btovar authored
11 resource_monitor_visualizer/bin/resource_monitor_visualizer.py
@@ -85,7 +85,7 @@ def fill_histogram_template(width, height, image_path, binwidth, resource_name,
85 85 result += "bin(x,width)=width*floor(x/width)\n"
86 86 result += "set yrange [0:*]\n"
87 87 result += "set xrange [0:*]\n"
88   - result += "set xlabel \"" + resource_name
  88 + result += "set xlabel \"" + resource_name.replace('_', ' ')
89 89 if unit != " ":
90 90 result += " (" + unit + ")"
91 91 result += "\"\n"
@@ -336,6 +336,10 @@ def scale_value(initial, target_unit=" "):
336 336 def main():
337 337 GNUPLOT_VERSION = find_gnuplot_version()
338 338
  339 + visualizer_home = os.path.normpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..'))
  340 +
  341 + print(visualizer_home)
  342 +
339 343 (source_directory,
340 344 destination_directory,
341 345 name) = get_args()
@@ -408,9 +412,10 @@ def main():
408 412 create_aggregate_plots(resources, resource_units, workspace, destination_directory)
409 413
410 414 create_main_page(groups.keys(), name, resources, destination_directory, hist_small, hist_small, aggregate_height, aggregate_width, time_series_exist)
  415 +
  416 + lib_static_home = os.path.normpath(os.path.join(visualizer_home, 'lib/resource_monitor_visualizer_static'))
411 417
412   - os.system("cp -r ../lib/resource_monitor_visualizer_static/* " + destination_directory)
413   -
  418 + os.system("cp -r " + lib_static_home + "/* " + destination_directory)
414 419 os.system("rm -rf " + workspace)
415 420
416 421 main()

0 comments on commit 28eb69d

Please sign in to comment.
Something went wrong with that request. Please try again.