You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2015/03/05 17:17:36 UTC

[1/2] incubator-tinkerpop git commit: Fix units on metrics duration for GraphSON

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/master c78984a2f -> 5be107e05


Fix units on metrics duration for GraphSON


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/782a9392
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/782a9392
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/782a9392

Branch: refs/heads/master
Commit: 782a93920dc4c881ff4587a3dda13f957cf24241
Parents: 8cad712
Author: rjbriody <bo...@datastax.com>
Authored: Thu Mar 5 10:18:00 2015 -0500
Committer: rjbriody <bo...@datastax.com>
Committed: Thu Mar 5 10:18:00 2015 -0500

----------------------------------------------------------------------
 .../tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/782a9392/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java
index 76b8e42..cedb4ca 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java
@@ -244,7 +244,7 @@ public class GraphSONModule extends SimpleModule {
         private static void serializeInternal(final TraversalMetrics traversalMetrics, final JsonGenerator jsonGenerator) throws IOException {
             final Map<String, Object> m = new HashMap<>();
 
-            m.put(GraphSONTokens.DURATION, traversalMetrics.getDuration(TimeUnit.MILLISECONDS));
+            m.put(GraphSONTokens.DURATION, traversalMetrics.getDuration(TimeUnit.NANOSECONDS) / 1000000d);
             List<Map<String, Object>> metrics = new ArrayList<>();
             traversalMetrics.getMetrics().forEach(it -> metrics.add(metricsToMap(it)));
             m.put(GraphSONTokens.METRICS, metrics);
@@ -257,7 +257,7 @@ public class GraphSONModule extends SimpleModule {
             m.put(GraphSONTokens.ID, metrics.getId());
             m.put(GraphSONTokens.NAME, metrics.getName());
             m.put(GraphSONTokens.COUNTS, metrics.getCounts());
-            m.put(GraphSONTokens.DURATION, metrics.getDuration(TimeUnit.MILLISECONDS));
+            m.put(GraphSONTokens.DURATION, metrics.getDuration(TimeUnit.NANOSECONDS) / 1000000d);
 
             if (!metrics.getAnnotations().isEmpty()) {
                 m.put(GraphSONTokens.ANNOTATIONS, metrics.getAnnotations());


[2/2] incubator-tinkerpop git commit: Merge branch 'fixMetricsDurationUnitsInGraphSON' of https://github.com/rjbriody/incubator-tinkerpop

Posted by sp...@apache.org.
Merge branch 'fixMetricsDurationUnitsInGraphSON' of https://github.com/rjbriody/incubator-tinkerpop


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/5be107e0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/5be107e0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/5be107e0

Branch: refs/heads/master
Commit: 5be107e050c1d528e98f8bda519367f68c7b8ab6
Parents: c78984a 782a939
Author: Stephen Mallette <sp...@apache.org>
Authored: Thu Mar 5 11:17:07 2015 -0500
Committer: Stephen Mallette <sp...@apache.org>
Committed: Thu Mar 5 11:17:07 2015 -0500

----------------------------------------------------------------------
 .../tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------