def setup()

in scrooge-benchmark/src/main/scala/com/twitter/scrooge/benchmark/LazyTProtocol.scala [92:122]


    def setup(): Unit = {
      require(
        airportBytes.forall { b =>
          binaryThriftStructSerializer.fromBytes(b) == statelessLazySerializer.fromBytes(b)
        },
        "Deserializers do not agree, benchmarks pointless"
      )
      require(
        airports.forall { b =>
          ByteBuffer.wrap(binaryThriftStructSerializer.toBytes(b)) == ByteBuffer.wrap(
            statelessLazySerializer.toBytes(b)
          )
        },
        "Stateful vs normal Serializers do not agree, benchmarks pointless"
      )

      require(
        airportBytes.forall { b =>
          binaryThriftStructSerializer.fromBytes(b) == statefulLazySerializer.fromBytes(b)
        },
        "Stateful Deserializers do not agree, benchmarks pointless"
      )
      require(
        airports.forall { b =>
          ByteBuffer.wrap(binaryThriftStructSerializer.toBytes(b)) == ByteBuffer.wrap(
            statefulLazySerializer.toBytes(b)
          )
        },
        "Stateful Serializers do not agree, benchmarks pointless"
      )
    }