#NEWLINE# def collectdatafor( self , totalperiod , period = 1 ) : #NEWLINE# #INDENT# '\n\t\tNon-threaded collection of performance data:\n\t\tThis method allows you to specify the total period for which you would\n\t\tlike to run the Query, and the time interval between individual\n\t\truns.  The collected data is stored in query.curresults at the\n\t\t_end_ of the run.  The pathnames for the query are stored in\n\t\tquery.curpaths.\n\t\te.g.:\n\t\t\tquery.collectdatafor(30,2)\n\t\tWill collect data for 30seconds at 2 second intervals\n\t\t' #NEWLINE# tempresults = [ ] #NEWLINE# try : #NEWLINE# #INDENT# self . open ( ) #NEWLINE# for ind in xrange ( ( totalperiod / period ) ) : #NEWLINE# #INDENT# tempresults . append ( self . collectdata ( ) ) #NEWLINE# time . sleep ( period ) #NEWLINE# #UNINDENT# self . curresults = tempresults #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# self . close ( )