You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by GitBox <gi...@apache.org> on 2018/11/26 13:30:15 UTC

[GitHub] otaviojava edited a comment on issue #1001: uses the directly field instead of getter method

otaviojava edited a comment on issue #1001: uses the directly field instead of getter method
URL: https://github.com/apache/tinkerpop/pull/1001#issuecomment-440710798
 
 
   Is that right?
   
   ```java
   @Warmup(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
   @Measurement(iterations = 20, time = 1, timeUnit = TimeUnit.SECONDS)
   @Fork(3)
   @BenchmarkMode(Mode.AverageTime)
   @OutputTimeUnit(TimeUnit.NANOSECONDS)
   @State(Scope.Thread)
   public class ClientBenchmark {
   
   
       private final ObjectMapper mapper = GraphSONMapper.build().version(GraphSONVersion.V3_0).create().createMapper();
       private final Graph graph = TinkerFactory.createModern();
       private final Optional<Vertex> vertex = graph.traversal().V().tryNext();
   
       @Setup
       public void setup() {
       }
   
       @Benchmark
       public String write() throws JsonProcessingException {
           return mapper.writeValueAsString(vertex);
       }
   
   
   }
   ```
   
   
   * Benchmark.write  avgt   60  192,218  ns/op
   * Benchmark.write  avgt   60  212,345  ns/op (around 10% faster)
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services