use of org.camunda.bpm.engine.impl.metrics.reporter.DbMetricsReporter in project camunda-bpm-platform by camunda.
the class ReportDbMetricsCmd method execute.
public Void execute(CommandContext commandContext) {
ProcessEngineConfigurationImpl engineConfiguration = Context.getProcessEngineConfiguration();
if (!engineConfiguration.isMetricsEnabled()) {
throw new ProcessEngineException("Metrics reporting is disabled");
}
if (!engineConfiguration.isDbMetricsReporterActivate()) {
throw new ProcessEngineException("Metrics reporting to database is disabled");
}
DbMetricsReporter dbMetricsReporter = engineConfiguration.getDbMetricsReporter();
dbMetricsReporter.reportNow();
return null;
}
Aggregations