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 2016/10/06 18:15:36 UTC
[14/14] tinkerpop git commit: Added docs for Metrics and updated
changelog
Added docs for Metrics and updated changelog
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/ec6acefb
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/ec6acefb
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/ec6acefb
Branch: refs/heads/TINKERPOP-1487
Commit: ec6acefb353b4a3aa0e8604c6f914ca62fb9b0cd
Parents: 17449e2
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Oct 5 11:23:59 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Oct 6 14:07:44 2016 -0400
----------------------------------------------------------------------
CHANGELOG.asciidoc | 2 ++
docs/src/dev/io/graphson.asciidoc | 65 ++++++++++++++++++++++++++++++++++
2 files changed, 67 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ec6acefb/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index cfe2bfe..f24f8d1 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -42,6 +42,8 @@ TinkerPop 3.2.3 (Release Date: NOT OFFICIALLY RELEASED YET)
* Fixed a end-step label bug in `MatchPredicateStrategy`.
* Fixed a bug in `MatchPredicateStrategy` where inlined traversals did not have strategies applied to it.
* Fixed a bug in `RepeatUnrollStrategy` where inlined traversal did not have strategies applied to it.
+* Fixed GraphSON 2.0 namespace for `TinkerGraph` to be "tinker" instead of "gremlin".
+* Dropped serialization support in GraphSON 2.0 for `Calendar`, `TimeZone`, and `Timestamp`.
* Added `TraversalHelper.copyLabels()` for copying (or moving) labels form one step to another.
* Added `TraversalHelper.applySingleLevelStrategies()` which will apply a subset of strategies but not walk the child tree.
* Added the concept that hidden labels using during traversal compilation are removed at the end during `StandardVerificationStrategy`. (*breaking*)
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ec6acefb/docs/src/dev/io/graphson.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/io/graphson.asciidoc b/docs/src/dev/io/graphson.asciidoc
index 8fa5eee..511a0fc 100644
--- a/docs/src/dev/io/graphson.asciidoc
+++ b/docs/src/dev/io/graphson.asciidoc
@@ -150,6 +150,10 @@ file.withWriter { writer ->
writer.write(toJson(Order.incr, "Order"))
writer.write(toJson(Pop.all, "Pop"))
writer.write(toJson(org.apache.tinkerpop.gremlin.util.function.Lambda.function("{ it.get() }"), "Lambda"))
+ tm = g.V().hasLabel('person').out().out().tree().profile().next()
+ metrics = new org.apache.tinkerpop.gremlin.process.traversal.util.MutableMetrics(tm.getMetrics(0));
+ metrics.addNested(new org.apache.tinkerpop.gremlin.process.traversal.util.MutableMetrics(tm.getMetrics(1)));
+ writer.write(toJson(m, "Metrics"))
writer.write(toJson(P.gt(0), "P"))
writer.write(toJson(P.gt(0).and(P.lt(10)), "P and"))
writer.write(toJson(P.gt(0).or(P.within(-1, -10, -100)), "P or"))
@@ -3680,6 +3684,67 @@ Lambda
}
----
+Metrics
+^^^^^^^
+
+[source,json]
+----
+{
+ "@type" : "g:Metrics",
+ "@value" : {
+ "dur" : {
+ "@type" : "g:Double",
+ "@value" : 0.163871
+ },
+ "counts" : {
+ "traverserCount" : {
+ "@type" : "g:Int64",
+ "@value" : 4
+ },
+ "elementCount" : {
+ "@type" : "g:Int64",
+ "@value" : 4
+ }
+ },
+ "name" : "TinkerGraphStep(vertex,[~label.eq(person)])",
+ "annotations" : {
+ "percentDur" : {
+ "@type" : "g:Double",
+ "@value" : 14.805689498929809
+ }
+ },
+ "id" : "7.0.0()",
+ "metrics" : [ {
+ "@type" : "g:Metrics",
+ "@value" : {
+ "dur" : {
+ "@type" : "g:Double",
+ "@value" : 0.293702
+ },
+ "counts" : {
+ "traverserCount" : {
+ "@type" : "g:Int64",
+ "@value" : 13
+ },
+ "elementCount" : {
+ "@type" : "g:Int64",
+ "@value" : 13
+ }
+ },
+ "name" : "VertexStep(OUT,vertex)",
+ "annotations" : {
+ "percentDur" : {
+ "@type" : "g:Double",
+ "@value" : 26.535876495625722
+ }
+ },
+ "id" : "2.0.0()"
+ }
+ } ]
+ }
+}
+----
+
P
^