简体   繁体   English

Neo4j-如何使用Neo4j在REST API中获得经过查询的密码时间?

[英]Neo4j - How do I get elapsed query cypher time in the REST API with Neo4j?

How do I get elapsed query cypher time in the REST API with Neo4j? 如何使用Neo4j在REST API中获得经过查询的密码时间? (I need a field with the query time) (我需要一个带有查询时间的字段)

Thanks. 谢谢。

This is not exposed directly from the Neo4j REST API, however you can measure it on the client side (which of course will show the http overhead). 它不是直接从Neo4j REST API中公开的,但是您可以在客户端进行测量(当然这会显示http开销)。 Using python and py2neo for example: 以python和py2neo为例:

import time
from py2neo import Graph

db = Graph()

def query():
    start = time.time()
    db.cypher.execute("MATCH (a) RETURN count(a);")
    end = time.time()
    print("Query took: " + str((end-start)*1000) + " ms")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM