#NEWLINE# def testObjectCreation2( self ) : #NEWLINE# #INDENT# def ProtoCreateAndSerialize( ) : #NEWLINE# #INDENT# s = jobs_pb2 . GrrMessage ( name = 'foo' , request_id = 1 , response_id = 1 , session_id = 'session' ) #NEWLINE# return len ( s . SerializeToString ( ) ) #NEWLINE# #UNINDENT# def RDFStructCreateAndSerialize( ) : #NEWLINE# #INDENT# s = StructGrrMessage ( name = 'foo' , request_id = 1 , response_id = 1 , session_id = 'session' ) #NEWLINE# return len ( s . SerializeToString ( ) ) #NEWLINE# #UNINDENT# self . TimeIt ( self , 'Protobuf from keywords' ) #NEWLINE# self . TimeIt ( RDFStructCreateAndSerialize , 'RDFStruct from keywords' )