cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Timing your rules

Timing your rules

When you want to time any IdentityIQ rule to determine how long it takes to run, do the following.

Ideally, you'd use log.trace() so you can use log4j to turn on/turn off this logging at runtime.

 

Put this at the beginning of your rule:

 

long startDateTime = System.currentTimeMillis();

 

Put this at the end of your rule, prior to your return statement.

 

long timeSpentInRule = System.currentTimeMillis() - startDateTime;

 

//

// Use log.trace() ideally, or use System.out.println() if you are just exploring.

//

//System.out.println("Finishing Rule... Total Time: " + timeSpentInRule + " milliseconds");

log.trace("Finishing Rule... Total Time: " + timeSpentInRule + " milliseconds");

Labels (2)
Version history
Revision #:
3 of 3
Last update:
‎Dec 12, 2023 08:59 PM
Updated by:
 
Contributors