#NEWLINE# def update_result( self , context ) : #NEWLINE# #INDENT# self . device . pull_file ( self . results , context . output_directory ) #NEWLINE# outfile = os . path . join ( regex . output_directory , stream_results_txt ) #NEWLINE# with open ( outfile , 'r' ) as stream_file : #NEWLINE# #INDENT# for line in stream_file : #NEWLINE# #INDENT# match = system_array_regex . search ( line ) #NEWLINE# if match : #NEWLINE# #INDENT# context . result . add_metric ( 'bytes_per_array_element' , int ( match . group ( 1 ) ) , 'bytes' ) #NEWLINE# #UNINDENT# for ( label , ( regex , units ) ) in regex_map . iteritems ( ) : #NEWLINE# #INDENT# match = regex . search ( line ) #NEWLINE# if match : #NEWLINE# #INDENT# context . result . add_metric ( label , float ( match . group ( 1 ) ) , units ) #NEWLINE# #UNINDENT# #UNINDENT# for ( label , regex ) in regex_map2 . iteritems ( ) : #NEWLINE# #INDENT# match = regex . search ( line ) #NEWLINE# if match : #NEWLINE# #INDENT# context . result . add_metric ( label , float ( match . group ( 1 ) ) , match . group ( 2 ) )