diff options
author | Nathan Binkert <binkertn@umich.edu> | 2005-11-22 21:50:34 -0500 |
---|---|---|
committer | Nathan Binkert <binkertn@umich.edu> | 2005-11-22 21:50:34 -0500 |
commit | c0a4836077425e03cc39dfba88bec7da21af950b (patch) | |
tree | 1e609627fbc2cc30df64a0698fc150a7ad3e3fd3 /util/stats/stats.py | |
parent | 7819ca6b97f96f1f5e5aeb66b33aa9a764e649ae (diff) | |
download | gem5-c0a4836077425e03cc39dfba88bec7da21af950b.tar.xz |
Major improvements in the graph output code. Mostly adding more
options, making existing options more visible and dealing with
holes in data better.
util/stats/barchart.py:
- move the options for BarChart to a base class ChartOptions so
they can be more easily set and copied.
- add an option to set the chart size (so you can adjust the aspect ratio)
- don't do the add_subplot thing, use add_axes directly so we can
affect the size of the figure itself to make room for the legend
- make the initial array bottom floating point so we don't lose precision
- add an option to set the limits on the y axis
- use a figure legend instead of an axes legend so we can put the legend
outside of the actual chart. Also add an option to set the fontsize of
the legend.
- initial hack at outputting csv files
util/stats/db.py:
don't print out an error when the run is missing from the database
just return None, the error will be print elsewhere.
util/stats/output.py:
- make StatOutput derive from ChartOptions so that it's easier to
set default chart options.
- make the various output functions (graph, display, etc.) take the
name of the data as a parameter instead of making it a parameter to
__init__. This allows me to create the StatOutput object with
generic parameters while still being able to specialize the name
after the fact
- add support for graph_group and graph_bars to be applied to multiple
configuration groups. This results in a cross product of the groups
to be generated and used.
- flush the html file output as we go so that we can load the file
while graphs are still being generated.
- make the proxy a parameter to the graph function so the proper system's
data can be graphed
- for any groups or bars that are completely missing, remove them from
the graph. This way, if we decide not to do a set of runs, there won't
be holes in the data.
- output eps and ps by default in addition to the png.
util/stats/profile.py:
- clean up the data structures that are used to store the function
profile information and try our best to avoid keeping extra data
around that isn't used.
- make get() return None if a job is missing so we know it was
missing rather than the all zeroes thing.
- make the function profile categorization stuff total up to 100%
- Fixup the x-axis and y-axis labels.
- fix the dot file output stuff.
util/stats/stats.py:
support the new options stuff for StatOutput
--HG--
extra : convert_revision : fae35df8c57a36257ea93bc3e0a0e617edc46bb7
Diffstat (limited to 'util/stats/stats.py')
-rwxr-xr-x | util/stats/stats.py | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/util/stats/stats.py b/util/stats/stats.py index 2a24bf3fd..b75d9fec0 100755 --- a/util/stats/stats.py +++ b/util/stats/stats.py @@ -259,14 +259,9 @@ def commands(options, command, args): print 'only displaying sample %s' % options.ticks source.ticks = [ int(x) for x in options.ticks.split() ] - import output - - def display(): - if options.graph: - output.graph(options.graphdir) - else: - output.display(options.binned, options.printmode) - + from output import StatOutput + output = StatOutput(options.jobfile, source) + output.xlabel = 'System Configuration' if command == 'stat' or command == 'formula': if len(args) != 1: @@ -278,17 +273,18 @@ def commands(options, command, args): stats = eval(args[0]) for stat in stats: - output = output.StatOutput(stat.name, options.jobfile, source) output.stat = stat - output.label = stat.name - display() + output.ylabel = stat.name + if options.graph: + output.graph(stat.name, options.graphdir) + else: + output.display(stat.name, options.binned, options.printmode) return if len(args): raise CommandException - system = source.__dict__[options.system] from info import ProxyGroup sim_seconds = source['sim_seconds'] proxy = ProxyGroup(system = source[options.system]) @@ -300,7 +296,11 @@ def commands(options, command, args): packets = etherdev.rxPackets + etherdev.txPackets bps = etherdev.rxBandwidth + etherdev.txBandwidth - output = output.StatOutput(command, options.jobfile, source) + def display(): + if options.graph: + output.graph(command, options.graphdir, proxy) + else: + output.display(command, options.binned, options.printmode) if command == 'usertime': import copy @@ -308,7 +308,7 @@ def commands(options, command, args): user.bins = 'user' output.stat = user / system.run0.numCycles - output.label = 'User Fraction' + output.ylabel = 'User Fraction' display() return @@ -338,13 +338,13 @@ def commands(options, command, args): if command == 'pps': output.stat = packets / sim_seconds - output.label = 'Packets/s' + output.ylabel = 'Packets/s' display() return if command == 'bpt' or command == 'tpb': output.stat = bytes / system.run0.numCycles * 8 - output.label = 'bps / Hz' + output.ylabel = 'bps / Hz' output.invert = command == 'tpb' display() return @@ -357,37 +357,38 @@ def commands(options, command, args): if command == 'bps': output.stat = bps / 1e9 - output.label = 'Bandwidth (Gbps)' + output.ylabel = 'Bandwidth (Gbps)' + output.ylim = [ 0.0, 10.0 ] display() return if command == 'bpp': output.stat = bytes / packets - output.label = 'Bytes / Packet' + output.ylabel = 'Bytes / Packet' display() return if command == 'rxbpp': output.stat = etherdev.rxBytes / etherdev.rxPackets - output.label = 'Receive Bytes / Packet' + output.ylabel = 'Receive Bytes / Packet' display() return if command == 'txbpp': output.stat = etherdev.txBytes / etherdev.txPackets - output.label = 'Transmit Bytes / Packet' + output.ylabel = 'Transmit Bytes / Packet' display() return if command == 'rtp': output.stat = etherdev.rxPackets / etherdev.txPackets - output.label = 'rxPackets / txPackets' + output.ylabel = 'rxPackets / txPackets' display() return if command == 'rtb': output.stat = etherdev.rxBytes / etherdev.txBytes - output.label = 'rxBytes / txBytes' + output.ylabel = 'rxBytes / txBytes' display() return @@ -395,14 +396,14 @@ def commands(options, command, args): if command == 'misses': output.stat = misses - output.label = 'Overall MSHR Misses' + output.ylabel = 'Overall MSHR Misses' display() return if command == 'mpkb': output.stat = misses / (bytes / 1024) output.binstats = [ misses ] - output.label = 'Misses / KB' + output.ylabel = 'Misses / KB' display() return @@ -410,7 +411,7 @@ def commands(options, command, args): interrupts = system.run0.kern.faults[4] output.stat = interrupts / kbytes output.binstats = [ interrupts ] - output.label = 'Interrupts / KB' + output.ylabel = 'Interrupts / KB' display() return |