[英]How to fetch infinispan cache statistics in wildfly?
I am trying to fetch the statistics with jboss-cli我正在尝试使用 jboss-cli 获取统计信息
[standalone@localhost:9990 /] /subsystem=infinispan/cache-container=hibernate/local-cache=entity:read-attribute(name=statistics-enabled)
{
"outcome" => "success",
"result" => true
}
That looks good but all actual statistics attributes do not return a value.这看起来不错,但所有实际的统计属性都没有返回值。
[standalone@localhost:9990 /] /subsystem=infinispan/cache-container=hibernate/local-cache=entity:read-attribute(name=number-of-entries)
{"outcome" => "success"}
The configuration in persistence.xml is: persistence.xml 中的配置是:
<property name="hibernate.generate_statistics" value="true" />
<property name="hibernate.cache.infinispan.statistics" value="true"/>
<property name="hibernate.cache.use_second_level_cache" value="true" />
and in standalone.xml:在standalone.xml中:
<cache-container name="hibernate" module="org.infinispan.hibernate-cache" statistics-enabled="true">
<local-cache name="entity" statistics-enabled="true">
<transaction locking="OPTIMISTIC" mode="NON_XA"/>
<object-memory size="10000"/>
<expiration max-idle="100000"/>
</local-cache>
<!-- ... -->
</cache-container>
It seems that "resolve-expressions=true" helps:似乎“resolve-expressions=true”有帮助:
/subsystem=infinispan/cache-container=hibernate/local-cache=entity/:read-attribute(name=number-of-entries,resolve-expressions=true,include-defaults=false)
{
"outcome" => "success",
"result" => undefined
}
It is consistent with that I see in jConsole -> WidlFly CLI tab.这与我在 jConsole -> WidlFly CLI 选项卡中看到的一致。 But this path does not yield real Hibernate statistics that I can see in MBeans tab, so it does not completely answer your question.但是这条路径不会产生我可以在 MBeans 选项卡中看到的真正的 Hibernate 统计信息,所以它不能完全回答你的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.