use of com.evolveum.midpoint.util.statistics.OperationsPerformanceInformation in project midpoint by Evolveum.
the class InternalsPerformancePanel method getStatistics.
@SuppressWarnings("Duplicates")
private String getStatistics() {
StringBuilder sb = new StringBuilder();
MidPointApplication midPointApplication = MidPointApplication.get();
if (midPointApplication != null) {
PerformanceInformation performanceInformation = midPointApplication.getSqlPerformanceMonitorsCollection().getGlobalPerformanceInformation();
sb.append("SQL performance information (repository, audit)\n\n").append(RepositoryPerformanceInformationUtil.format(performanceInformation.toRepositoryPerformanceInformationType())).append("\n");
}
Map<String, CachePerformanceCollector.CacheData> cache = CachePerformanceCollector.INSTANCE.getGlobalPerformanceMap();
if (cache != null) {
sb.append("Cache performance information\n\n").append(CachePerformanceInformationUtil.format(CachePerformanceInformationUtil.toCachesPerformanceInformationType(cache))).append("\n");
sb.append("Cache performance information (extra - experimental):\n").append(CachePerformanceInformationUtil.formatExtra(cache)).append("\n");
} else {
sb.append("Cache performance information is currently not available." + "Please set up cache monitoring in the system configuration.\n\n");
}
OperationsPerformanceInformation methods = OperationsPerformanceMonitor.INSTANCE.getGlobalPerformanceInformation();
if (methods != null) {
sb.append("Methods performance information\n\n").append(OperationsPerformanceInformationUtil.format(OperationsPerformanceInformationUtil.toOperationsPerformanceInformationType(methods))).append("\n");
} else {
sb.append("Methods performance information is currently not available." + "Please set up performance monitoring in the system configuration.\n\n");
}
return sb.toString();
}
Aggregations