From 122f457226f54ad23b7cd138512502e430e704dc Mon Sep 17 00:00:00 2001 From: Mac Mollison Date: Sat, 13 Mar 2010 12:12:37 -0500 Subject: Further restructuring to create 'unit_trace' pkg The unit_trace folder should be placed in /usr/local/lib/pythonX.Y/site-packages. This makes unit-trace submodules available from anywhere on the system. --- viz/renderer.py | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 viz/renderer.py (limited to 'viz/renderer.py') diff --git a/viz/renderer.py b/viz/renderer.py deleted file mode 100644 index d94129c..0000000 --- a/viz/renderer.py +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/python -from schedule import * -from draw import * - -"""The renderer, a glue object which converts a schedule to its representation -on a graph.""" - -class Renderer(object): - def __init__(self, schedule): - self.schedule = schedule - - def prepare_task_graph(self, SurfaceType=ImageSurface, attrs=GraphFormat()): - """Outputs the fully-rendered graph (y-axis = tasks) to a Cairo ImageSurface""" - item_list = self.get_task_item_list() - start, end = self.schedule.get_time_bounds() - self.graph = TaskGraph(CairoCanvas, SurfaceType(), start, end, item_list, attrs) - - def prepare_cpu_graph(self, SurfaceType=ImageSurface, attrs=GraphFormat()): - item_list = ['CPU %d' % i for i in range(0, self.schedule.get_num_cpus())] - start, end = self.schedule.get_time_bounds() - self.graph = CpuGraph(CairoCanvas, SurfaceType(), start, end, item_list, attrs) - - def render_graph_full(self): - """Does the heavy lifting for rendering a task or CPU graph, by scanning the schedule - and drawing it piece by piece""" - #graph.draw_axes('Time', '') - self.schedule.render(self.graph) - - def write_out(self, fname): - self.graph.surface.write_out(fname) - - def get_graph(self): - return self.graph - - def get_schedule(self): - return self.schedule - - def get_task_item_list(self): - return [task.get_name() for task in self.schedule.get_task_list()] - -- cgit v1.2.2