def testDecode(self):

    s = jobs_pb2.GrrMessage(name=u"foo", request_id=1, response_id=1,
                            session_id=u"session")
    data = s.SerializeToString()

    def ProtoDecode():
      new_s = jobs_pb2.GrrMessage()
      new_s.ParseFromString(data)

      self.assertEqual(new_s.session_id, "session")
      self.assertEqual(new_s.session_id.__class__, unicode)

    def RDFStructDecode():
      new_s = StructGrrMessage()
      new_s.ParseFromString(data)

      self.assertEqual(new_s.session_id, "session")
      self.assertEqual(new_s.session_id.__class__, unicode)

    self.TimeIt(RDFStructDecode)
    self.TimeIt(ProtoDecode)
Check if specified tag exist on the instance.
dataset/ETHPy150Open google/grr/grr/lib/rdfvalues/benchmark_test.py/RDFValueBenchmark.testDecode--crossover with--dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/db/api.py/instance_tag_exists