1#!/usr/bin/env python
2
3# Copyright (c) 2003-2004 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 248 unchanged lines hidden (view full) ---

257 if options.ticks:
258 if not options.graph:
259 print 'only displaying sample %s' % options.ticks
260 source.ticks = [ int(x) for x in options.ticks.split() ]
261
262 from output import StatOutput
263 output = StatOutput(options.jobfile, source)
264 output.xlabel = 'System Configuration'
265 output.colormap = 'RdYlGn'
266
267 if command == 'stat' or command == 'formula':
268 if len(args) != 1:
269 raise CommandException
270
271 if command == 'stat':
272 stats = source.getStat(args[0])
273 if command == 'formula':

--- 8 unchanged lines hidden (view full) ---

282 output.display(stat.name, options.binned, options.printmode)
283
284 return
285
286 if len(args):
287 raise CommandException
288
289 from info import ProxyGroup
289 sim_seconds = source['sim_seconds']
290 proxy = ProxyGroup(system = source[options.system])
291 system = proxy.system
292
293 etherdev = system.tsunami.etherdev0
294 bytes = etherdev.rxBytes + etherdev.txBytes
295 kbytes = bytes / 1024
296 packets = etherdev.rxPackets + etherdev.txPackets
297 bps = etherdev.rxBandwidth + etherdev.txBandwidth
297
298 def display():
299 if options.graph:
300 output.graph(command, options.graphdir, proxy)
301 else:
302 output.display(command, options.binned, options.printmode)
303
304 if command == 'usertime':

--- 26 unchanged lines hidden (view full) ---

331
332 if command == 'ppt' or command == 'tpp':
333 output.stat = packets / system.run0.numCycles
334 output.invert = command == 'tpp'
335 display()
336 return
337
338 if command == 'pps':
340 output.stat = packets / sim_seconds
339 output.stat = packets / source['sim_seconds']
340 output.ylabel = 'Packets/s'
341 display()
342 return
343
344 if command == 'bpt' or command == 'tpb':
345 output.stat = bytes / system.run0.numCycles * 8
346 output.ylabel = 'bps / Hz'
347 output.invert = command == 'tpb'
348 display()
349 return
350
351 if command in ('rxbps', 'txbps', 'bps'):
352 if command == 'rxbps':
353 output.stat = etherdev.rxBandwidth / 1e9
354 if command == 'txbps':
355 output.stat = etherdev.txBandwidth / 1e9
356 if command == 'bps':
358 output.stat = bps / 1e9
357 output.stat = (etherdev.rxBandwidth + etherdev.txBandwidth) / 1e9
358
359 output.ylabel = 'Bandwidth (Gbps)'
360 output.ylim = [ 0.0, 10.0 ]
361 display()
362 return
363
364 if command == 'bpp':
365 output.stat = bytes / packets

--- 148 unchanged lines hidden ---