<s> import Plugin <EOL> import VgReport <EOL> import VgTraceOperations <EOL> class VgPlugin ( Plugin . InteractivePlugin ) : <EOL> def __init__ ( self , analyzer ) : <EOL> self . analyzer = analyzer <EOL> self . analyzer . registerCommand ( "<STR_LIT>" , self . generateTraceReport ) <EOL> def generateTraceReport ( self , traceName , path = None , format = "<STR_LIT:html>" ) : <EOL> """<STR_LIT>""" <EOL> if not traceName in self . analyzer . traces : <EOL> self . analyzer . fail ( "<STR_LIT>" % traceName ) <EOL> trace = self . analyzer . traces [ traceName ] <EOL> traceFileName = self . analyzer . traceFiles . get ( traceName , None ) <EOL> if not path : <EOL> path = traceFileName . split ( "<STR_LIT:.>" , <NUM_LIT:1> ) [ <NUM_LIT:0> ] + "<STR_LIT>" <EOL> VgReport . generateReport ( self . analyzer . project , trace , traceFileName , path , format ) <EOL> self . analyzer . reportInfo ( "<STR_LIT>" % ( path ) ) <EOL> def postProcessInstrumentationData ( self , trace ) : <EOL> VgTraceOperations . calculateStatistics ( self . analyzer . project , trace ) </s>
