在Gremlin Console上显示时间
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在Gremlin Console上显示时间相关的知识,希望对你有一定的参考价值。
我试图在Gremlin控制台中测量查询所花费的时间。每次gremlin提示都可以显示时间吗?类似于“SET TIME ON”用于Oracle SQL控制台的方式。
答案
没有什么能够显示每次提示执行的时间。您当然可以通过profile()
和explain()
步骤进行遍历并获取有关内部执行方式的信息:
gremlin> g.V().out().profile()
==>Traversal Metrics
Step Count Traversers Time (ms) % Dur
=============================================================================================================
TinkerGraphStep(vertex,[]) 6 6 12.308 88.82
VertexStep(OUT,vertex) 6 6 1.268 9.15
NoOpBarrierStep(2500) 6 4 0.281 2.03
>TOTAL - - 13.857 -
gremlin> g.V().out().explain()
==>Traversal Explanation
=======================================================================================
Original Traversal [GraphStep(vertex,[]), VertexStep(OUT,vertex)]
ConnectiveStrategy [D] [GraphStep(vertex,[]), VertexStep(OUT,vertex)]
IncidentToAdjacentStrategy [O] [GraphStep(vertex,[]), VertexStep(OUT,vertex)]
MatchPredicateStrategy [O] [GraphStep(vertex,[]), VertexStep(OUT,vertex)]
FilterRankingStrategy [O] [GraphStep(vertex,[]), VertexStep(OUT,vertex)]
InlineFilterStrategy [O] [GraphStep(vertex,[]), VertexStep(OUT,vertex)]
AdjacentToIncidentStrategy [O] [GraphStep(vertex,[]), VertexStep(OUT,vertex)]
RepeatUnrollStrategy [O] [GraphStep(vertex,[]), VertexStep(OUT,vertex)]
CountStrategy [O] [GraphStep(vertex,[]), VertexStep(OUT,vertex)]
PathRetractionStrategy [O] [GraphStep(vertex,[]), VertexStep(OUT,vertex)]
LazyBarrierStrategy [O] [GraphStep(vertex,[]), VertexStep(OUT,vertex)]
TinkerGraphCountStrategy [P] [GraphStep(vertex,[]), VertexStep(OUT,vertex)]
TinkerGraphStepStrategy [P] [TinkerGraphStep(vertex,[]), VertexStep(OUT,vertex)]
ProfileStrategy [F] [TinkerGraphStep(vertex,[]), VertexStep(OUT,vertex)]
StandardVerificationStrategy [V] [TinkerGraphStep(vertex,[]), VertexStep(OUT,vertex)]
Final Traversal [TinkerGraphStep(vertex,[]), VertexStep(OUT,vertex)]
以上是关于在Gremlin Console上显示时间的主要内容,如果未能解决你的问题,请参考以下文章
进入gremlin console退出gremlin console
Gremlin: How to connect to gremlin server console
Gremlin: How to connect to gremlin server console
Gremlin: How to connect to gremlin server console