gpt4 book ai didi

gremlin - gremlin-console 中的计时查询

转载 作者:行者123 更新时间:2023-12-05 06:30:19 32 4
gpt4 key购买 nike

我正在尝试比较我在 gremlin-console 中查询的响应时间(图形数据库是 janusgraph,后端数据库是 hbase)。为此,有一个“clock()”步骤,它可以多次运行查询并返回平均响应时间。

但是正如文档中所述,有一个“热身”阶段:

The warm up simply consists of running the query one time before timing starts. This means that for a single timing iteration, the human perceived time will be roughly double the time returned by the clock analysis.

由于预热阶段,遍历所需的所有图形始终在缓存中,这在现实世界中并非如此。例如,我正在处理的查询需要 6 分钟才能完成,因为要从 hbase 后端获取大量数据,但 clock() 步骤显示的执行时间为 10 秒,这只能在最佳情况下才是真实的.

是否有另一种更好的方法来使用 gremlin-console 获得我的查询的正确执行时间?

最佳答案

我认为您仍然可以使用clock()。只需回滚执行之间的事务:

clock { g.V().iterate();g.tx().rollback() }

关于gremlin - gremlin-console 中的计时查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52537051/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com