#NEWLINE# def send_error_summary( self , data_buffer ) : #NEWLINE# #INDENT# '\n        Sends error summary file\n\n        :type data_buffer: list[bzt.modules.aggregator.DataPoint]\n        ' #NEWLINE# if ( not data_buffer ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# recent = data_buffer [ ( - 1 ) ] #NEWLINE# if ( not recent [ DataPoint . CUMULATIVE ] [ '' ] [ KPISet . ERRORS ] ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# errors = self . __errors_skel ( recent [ DataPoint . TIMESTAMP ] , self . active_session_id , self . test_id , self . user_id ) #NEWLINE# for ( label , label_data ) in iteritems ( recent [ DataPoint . CUMULATIVE ] ) : #NEWLINE# #INDENT# if ( not label_data [ KPISet . ERRORS ] ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( label == '' ) : #NEWLINE# #INDENT# label = 'ALL' #NEWLINE# #UNINDENT# error_item = self . __error_item_skel ( label ) #NEWLINE# for err_item in label_data [ KPISet . ERRORS ] : #NEWLINE# #INDENT# if ( err_item [ 'type' ] == KPISet . ERRTYPE_ASSERT ) : #NEWLINE# #INDENT# error_item [ 'assertionsCount' ] += err_item [ 'cnt' ] #NEWLINE# error_item [ 'assertions' ] . append ( { #NEWLINE# #INDENT# 'name' : 'All Assertions' , #NEWLINE# 'failureMessage' : err_item [ 'msg' ] , #NEWLINE# 'failure' : True , #NEWLINE# 'error' : False , #NEWLINE# 'count' : err_item [ 'cnt' ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# error_item [ 'count' ] += err_item [ 'cnt' ] #NEWLINE# error_item [ 'responseInfo' ] . append ( { #NEWLINE# #INDENT# 'description' : err_item [ 'msg' ] , #NEWLINE# 'code' : err_item [ 'rc' ] , #NEWLINE# 'count' : err_item [ 'cnt' ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# #UNINDENT# errors [ 'summery' ] [ 'labels' ] . append ( error_item ) #NEWLINE# #UNINDENT# self . upload_file ( 'sample.jtl.blazemeter.summery.json' , to_json ( errors ) )