Miroflow call timing

Hi, I want to know that is there any way we can get to know how much a single microflow or nanoflow is taking time to complete so that I can try to optimize my microflow? Thanks  Animesh
2 answers

You can get the Microflow executed in multiple ways

1. Based on the logs and timestamp. If you don't know where to look, Creating a log at front and end to check as a workaround
2. Writing a microflow like below (not recommended)

Activity 1 => startTime = System.nanoTime();

Activity 2 => call you microflow as sub microflow (you can replace your microflow to identify the time difference)

Activity 3 => endTime = System.nanoTime();

Activity 4 => difference is the total time.


Simple solution for timing microflows, without having to change micro/nanoflows:


Changing log level from MicroflowEngine to DEBUG will show start- and end times of microflow execution:


2022-11-22 12:32:06.595    MicroflowEngine    [1669116726546-10] Starting execution of microflow 'Administration.NewAccount'
2022-11-22 12:32:06.670    MicroflowEngine    [1669116726546-10] Finished execution of microflow 'Administration.NewAccount'
2022-11-22 12:32:06.967    MicroflowEngine    [1669116726962-15] Starting execution of microflow 'Administration.RetrieveTimeZones'
2022-11-22 12:32:06.984    MicroflowEngine    [1669116726962-15] Finished execution of microflow 'Administration.RetrieveTimeZones'


This however might cause a lot of extra log lines in (Console) log.