# Benchmarks

In a real-life application, ADI evaluates a Bank's capacity to process a certain volume of payments before their cutoff. In this context an attribute was built to evaluate the company's processing capacity rate. It is based on the payments processing rate during the last 30 minutes and the volume of payments to treat per cut-off.

## Scenario 1 : expression-based attribute

The processingCapacityRate attribute is based on the following expression :

```Min(
constant_1,
( (durationToDeadline / constant_1min) * process_throughputSTPLast30minAvg + (durationToDeadline / constant_1min) * process_throughputNonSTPLast30minAvg ) /* number of payments we can treat within the next cutoff time if we keep the same throughtput as the past 30 minutes */
/
inProcessCount  /* number of payments to treat within the cutoff */
)```

Results:

Attribute

Count

Total duration (ms) Average duration (ms)
processingCapacityRate 9810 99400 10

## Scenario 2 : benchmark of the same computation done without expression-based attributes but with a chain of temporary function-based attributes

Results:

Attribute Count Total duration (ms) Average duration (ms)
[temp. attribute 1] : Divide(durationToDeadline, constant_1min) 9830 65967 6
[temp. attribute 2] : Multiply by scalar ( [ temp. attribute 1] , process_throughputSTPLast30minAvg ) 9830 71395 7
[ temp. attribute 3] : Multiply by scalar ( [ temp. attribute 1] , process_throughputNonSTPLast30minAvg) 9830 73447 7
[temp attribute 4] : Add ( [temp. attribute 2] , [ temp. attribute 3] ) 9830 61417 6
[temp attribute 5] : Div ( [temp attribute 4] , inProcessCount ) 9830 61740 6
[processingCapacityRate] : Minimum (expression) ( constant_1 , [temp attribute 5] ) 9830 52655 5
TOTAL 9830 386621 37

# Conclusions

We can see – for this particular case – that the expression-based computing is around 3.8 times faster than the same computation done with a chain of function-based computings.