Navigation :
test ../../ test dev.html
Developer Guide
test ../../ test dev/dev-release.html
-
Release and migration notes
test ../../ test dev/getting-started.html
-
Getting started
test ../../ test dev/dev-ui-config.html
-
Configuring the UI
test ../../ test dev/dev-extensions.html
-
Extending the Module
test ../../ test dev/dev-extensions/custom-cube-config.html
--
Adding Custom Cube Configuration
test ../../ test dev/dev-extensions/custom-data-loading.html
--
Adding Custom Data Loading
test ../../ test dev/dev-extensions/custom-evaluation.html
--
Adding Custom Evaluation Logic
test ../../ test dev/dev-extensions/custom-limit-structure-templates.html
-- Adding Custom Limit Structure Templates
test ../../ test dev/dev-extensions/custom-ui-exceptions.html
-- Adding Custom UI Exceptions
test ../../ test dev/dev-extensions/custom-utilization.html
-- Adding Custom Utilization
test ../../ test dev/dev-extensions/custom-validation.html
--
Adding Custom Validation
test ../../ test dev/dev-extensions/custom-workflow.html
--
Adding Custom Workflow Tasks
test ../../ test dev/dev-extensions/custom-persistence.html
--
Adding Custom Persistence
test ../../ test dev/dev-extensions/custom-limits-events.html
--
Sending Custom Events
test ../../ test dev/integration.html
-
How to Connect Limits to an Atoti Server
test ../../ test dev/persistence.html
-
Persistence
test ../../ test dev/alert-tasks.html
-
Evaluating Limits
test ../../ test dev/scopes.html
-
Limit scopes
test ../../ test dev/limit-workflow.html
-
Limit Workflow
test ../../ test dev/date-roll.html
- Date Roll
test ../../ test dev/rest-services.html
- REST Services
test ../../ test dev/roles.html
-
Roles and Permissions
test ../../ test user-ref.html
User & Reference Guide
test ../../ test user-ref/limits-overview.html
-
Atoti Limits Overview
test ../../ test user-ref/whats-new.html
- What's New
test ../../ test user-ref/videos.html
- Video walk-throughs
test ../../ test user-ref/using-limits.html
-
Manage limits
test ../../ test user-ref/manage-incidents.html
-
Manage incidents
test ../../ test user-ref/input-files.html
-
Input file formats
test ../../ test user-ref/cube.html
-
Cube reference
test ../../ test user-ref/properties.html
-
Properties
test ../../ test user-ref/datastore.html
-
Datastores
Adding Custom Utilization
You can customize the Utilization calculation by adding a bean that implements the IUtilizationCalculator
interface. Here’s how to do this:
1. Create the Spring Bean
The IUtilizationCalculator
contains two methods that need to be overridden:
public interface IUtilizationCalculator {
/**
* @param copperContext
*
* Creates the utilization measure in the Limits cube using copper
*/
void createUtilizationMeasure ( ICopperContext copperContext);
/**
* @param incident
* @return the utilization value as per the evaluation
*/
double computeUtilization ( Incident incident);
The createUtilizationMeasure
method is used to create the utilization measure in the Limits cube. The computeUtilization
method is used to compute the
utilization
once a limit has been evaluated, and is visible in the Limits Status screen. The class DefaultUtilizationMeasureCalculator
handles the default calculation.
If you want to implement your own utilization calculation, for instance e x p o s u r e l i m i t V a l u e , the custom Spring Bean will look as follows:
@Component
public class MyUtilizationMeasureCalculator implements IUtilizationCalculator {
@Override
public void createUtilizationMeasure ( ICopperContext copperContext) {
Copper
. measure ( MEASURE_EXPOSURE)
. divide ( Copper. measure ( MEASURE_LIMIT_VALUE))
. per ( Copper. level ( DIM_TECHNICAL, HIER_INCIDENT_KEY, HIER_INCIDENT_KEY))
. doNotAggregateAbove ()
. withName ( MEASURE_UTILIZATION)
. withFormatter ( PERCENT_FORMAT)
. publish ( copperContext);
}
@Override
public double computeUtilization ( Incident incident) {
return incident. getMeasureValue () / incident. getLimitValue ()[ 0];
}
}
2. Import the Spring Bean
Once the bean is created, you need to import it to the project . Once done,
Spring will use the custom bean for calculating the utilization.