def testObjectCreation(self):
    test_proto = knowledge_base_pb2.User(**self.USER_ACCOUNT)
    test_proto = test_proto.SerializeToString()

    def RDFStructCreateAndSerialize():
      s = rdf_client.User(**self.USER_ACCOUNT)
      s.SerializeToString()

    def RDFStructCreateAndSerializeSetValue():
      s = rdf_client.User()
      for k, v in self.USER_ACCOUNT.iteritems():
        setattr(s, k, v)

      s.SerializeToString()

    def RDFStructCreateAndSerializeFromProto():
      s = rdf_client.User(test_proto)
      s.SerializeToString()

    def ProtoCreateAndSerialize():
      s = knowledge_base_pb2.User(**self.USER_ACCOUNT)
      s.SerializeToString()

    def ProtoCreateAndSerializeSetValue():
      s = knowledge_base_pb2.User()
      for k, v in self.USER_ACCOUNT.iteritems():
        setattr(s, k, v)

      s.SerializeToString()

    def ProtoCreateAndSerializeFromProto():
      s = knowledge_base_pb2.User()
      s.ParseFromString(test_proto)
      self.assertEqual(s.SerializeToString(), test_proto)

    self.TimeIt(RDFStructCreateAndSerialize,
                "SProto Create from keywords and serialize.")

    self.TimeIt(RDFStructCreateAndSerializeSetValue,
                "SProto Create, Set And Serialize")

    self.TimeIt(RDFStructCreateAndSerializeFromProto,
                "SProto from serialized and serialize.")

    self.TimeIt(ProtoCreateAndSerialize,
                "Protobuf from keywords and serialize.")

    self.TimeIt(ProtoCreateAndSerializeSetValue,
                "Protobuf Create, Set and serialize")

    self.TimeIt(ProtoCreateAndSerializeFromProto,
                "Protobuf from serialized and serialize.")
Returns the tree item text for an element.
dataset/ETHPy150Open google/grr/grr/lib/rdfvalues/benchmark_test.py/RDFValueBenchmark.testObjectCreation--crossover with--dataset/ETHPy150Open enthought/pyface/pyface/viewer/tree_viewer.py/TreeViewer._get_text