1.34.1. Statistics on the Database Access Layer

In order to have a better idea of the time spent into the database access layer, it can be interesting to get some statistics on that part of the code, knowing that most of the time spent into eXo JCR is mainly the database access. This statistics will then allow you to identify without using any profiler what is normally slow in this layer, which could help to fix the problem quickly.

In case you use org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer or org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer as WorkspaceDataContainer, you can get statistics on the time spent into the database access layer. The database access layer (in eXo JCR) is represented by the methods of the interface org.exoplatform.services.jcr.storage.WorkspaceStorageConnection, so for all the methods defined in this interface, we can have the following figures:

Those figures are also available globally for all the methods which gives us the global behavior of this layer.

If you want to enable the statistics, you just need to set the JVM parameter called JDBCWorkspaceDataContainer.statistics.enabled to true. The corresponding CSV file is StatisticsJDBCStorageConnection-${creation-timestamp}.csv for more details about how the csv files are managed, please refer to the section dedicated to the statistics manager.

The format of each column header is ${method-alias}-${metric-alias}. The metric alias are described in the statistics manager section.

The name of the category of statistics corresponding to these statistics is JDBCStorageConnection, this name is mostly needed to access to the statistics through JMX.

globalThis is the alias for all the methods.
getItemDataByIdThis is the alias for the method getItemData(String identifier).
getItemDataByNodeDataNQPathEntryThis is the alias for the method getItemData(NodeData parentData, QPathEntry name).
getChildNodesDataThis is the alias for the method getChildNodesData(NodeData parent).
getChildNodesCountThis is the alias for the method getChildNodesCount(NodeData parent).
getChildPropertiesDataThis is the alias for the method getChildPropertiesData(NodeData parent).
listChildPropertiesDataThis is the alias for the method listChildPropertiesData(NodeData parent).
getReferencesDataThis is the alias for the method getReferencesData(String nodeIdentifier).
commitThis is the alias for the method commit().
addNodeDataThis is the alias for the method add(NodeData data).
addPropertyDataThis is the alias for the method add(PropertyData data).
updateNodeDataThis is the alias for the method update(NodeData data).
updatePropertyDataThis is the alias for the method update(PropertyData data).
deleteNodeDataThis is the alias for the method delete(NodeData data).
deletePropertyDataThis is the alias for the method delete(PropertyData data).
renameNodeDataThis is the alias for the method rename(NodeData data).
rollbackThis is the alias for the method rollback().
isOpenedThis is the alias for the method isOpened().
closeThis is the alias for the method close().

Copyright ©2012. All rights reserved. eXo Platform SAS