4.3.3. JCR statistics

4.3.3.1. Statistics on database access layer
4.3.3.2. Statistics on JCR API accesses

This section will show you how to get and manage all statistics provided by eXo JCR. All the statistics are controlled by the statistics manager which is reponsible for printing data into the CSV files and exposing the statistics through JMX and/or Rest.

Statistics Manager

The statistics manager will create all the CSV files for each category of statistics under its management. These files are in the format of Statistics${category-name}-${creation-timestamp}.csv. Those files will be created into the user directory if it is possible otherwise it will create them into the temporary directory. The .csv files (for example, Comma-Separated Values) includes: one new line which is added regularly (every 5 seconds by default) and one last line which will be added at JVM exit. Each line has 5 figures described below for each method and globally for all methods.

MinThe minimum time spent into the method expressed in milliseconds.
MaxThe maximum time spent into the method expressed in milliseconds.
TotalThe total amount of time spent into the method expressed in milliseconds.
AvgThe average time spent into the method expressed in milliseconds.
TimesThe total amount of times the method has been called.

By default, the JVM parameter called JCRStatisticsManager.persistence.enabled is set to "true". Also, the JCRStatisticsManager.persistence.timeout JVM parameter that shows period between each record (for example, line of data into the file) is set to 5000. You can define another periods by setting its value to your desired one in milliseconds.

You can also access the statistics thanks to JMX, the available methods are the following:

getMinGive the minimum time spent into the method corresponding to the given category name and statistics name. The expected arguments are the name of the category of statistics (for example, JDBCStorageConnection) and the name of the expected method or global for the global value.
getMaxGive the maximum time spent into the method corresponding to the given category name and statistics name. The expected arguments are the name of the category of statistics (for example, JDBCStorageConnection) and the name of the expected method or global for the global value.
getTotalGive the total amount of time spent into the method corresponding to the given category name and statistics name. The expected arguments are the name of the category of statistics (for example, JDBCStorageConnection) and the name of the expected method or global for the global value.
getAvgGive the average time spent into the method corresponding to the given category name and statistics name. The expected arguments are the name of the category of statistics (for example, JDBCStorageConnection) and the name of the expected method or global for the global value.
getTimesGive the total amount of times the method has been called corresponding to the given category name and statistics name. The expected arguments are the name of the category of statistics (for example, JDBCStorageConnection) and the name of the expected method or global for the global value.
resetReset the statistics for the given category name and statistics name. The expected arguments are the name of the category of statistics (for example, JDBCStorageConnection) and the name of the expected method or global for the global value.
resetAllReset all the statistics for the given category name. The expected argument is the name of the category of statistics (for example, JDBCStorageConnection).


The full name of the related MBean is exo:service=statistic, view=jcr.

Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus