• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package perf;
2 
3 import com.fasterxml.jackson.databind.json.JsonMapper;
4 
5 /**
6  * Simple manually run micro-benchmark for checking effects of (de)serializer
7  * pre-fetching
8  */
9 public class ManualReadPerfWithRecord extends ObjectReaderTestBase
10 {
11     @Override
targetSizeMegs()12     protected int targetSizeMegs() { return 8; }
13 
main(String[] args)14     public static void main(String[] args) throws Exception
15     {
16         if (args.length != 0) {
17             System.err.println("Usage: java ...");
18             System.exit(1);
19         }
20         Record input = new Record(44, "BillyBob", "Bumbler", 'm', true);
21         RecordAsArray input2 = new RecordAsArray(44, "BillyBob", "Bumbler", 'm', true);
22         JsonMapper m = new JsonMapper();
23         new ManualReadPerfWithRecord().testFromBytes(m, "JSON-as-Object", input, Record.class,
24                 m, "JSON-as-Array", input2, RecordAsArray.class);
25     }
26 }
27