class SerializationBenchmark {

  private Gson gson;
  private BagOfPrimitives bag;
  @Param private boolean pretty;

  public static void main(String[] args) {
    NonUploadingCaliperRunner.run(SerializationBenchmark.class, args);
  }

  @BeforeExperiment
  void setUp() throws Exception {
    this.gson = pretty ? new GsonBuilder().setPrettyPrinting().create() : new Gson();
    this.bag = new BagOfPrimitives(10L, 1, false, "foo");
  }

  public void timeObjectSerialization(int reps) {<FILL_FUNCTION_BODY>}
}

    for (int i = 0; i < reps; ++i) {
      gson.toJson(bag);
    }
  
<no_super_class>