MarkLogic中有没有公开的接口来获取特定应用服务器在规定时间内所有长时间运行的查询的列表,比如,如果我想要过去12小时内耗时超过5秒的所有查询,我可以使用一个接口或调用来实现吗?
我正在使用由计划作业调用的模块中的以下XQuery来生成结果,但它不能满足我的所有需求
xquery version "1.0-ml";
import module namespace res="http://marklogic.com/manage/resource" at "/MarkLogic/manage/endpoints/resource.xqy";
import module namespace dmod = "http://marklogic.com/manage/database" at "/MarkLogic/manage/models/database-model.xqy";
import module namespace gmod="http://marklogic.com/manage/group" at "/MarkLogic/manage/models/group-model.xqy";
import module namespace hmod="http://marklogic.com/manage/host" at "/MarkLogic/manage/models/host-model.xqy";
import module namespace rmod = "http://marklogic.com/manage/request" at "/MarkLogic/manage/models/request-model.xqy";
import module namespace smod="http://marklogic.com/manage/server" at "/MarkLogic/manage/models/server-model.xqy";
declare namespace r ="http://marklogic.com/manage/requests";
let $results := rmod:get-list-default-view($res:context,gmod:get-id($res:context),hmod:get-id($res:context),smod:get-id($res:context),rmod:get-seconds-min($res:context))
return $results
发布于 2018-06-06 01:25:35
我建议看看Troubleshooting queries,看看它是否有帮助,尽管它只适用于当前的查询。
计量历史记录将为您提供总体信息,但对于每个查询的统计数据,您可能需要以某种方式记录这些信息,然后提取它。
https://stackoverflow.com/questions/50525325
复制相似问题