Search in sources :

Example 1 with OperationsPerformanceInformation

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();
}
Also used : MidPointApplication(com.evolveum.midpoint.web.security.MidPointApplication) PerformanceInformation(com.evolveum.midpoint.repo.api.perf.PerformanceInformation) OperationsPerformanceInformation(com.evolveum.midpoint.util.statistics.OperationsPerformanceInformation) OperationsPerformanceInformation(com.evolveum.midpoint.util.statistics.OperationsPerformanceInformation)

Aggregations

PerformanceInformation (com.evolveum.midpoint.repo.api.perf.PerformanceInformation)1 OperationsPerformanceInformation (com.evolveum.midpoint.util.statistics.OperationsPerformanceInformation)1 MidPointApplication (com.evolveum.midpoint.web.security.MidPointApplication)1