# Execution time metrics

**URL:** <https://forum.flowable.org/t/execution-time-metrics/4637>\
**Category:** Flowable Engine\
**Created:** [October 4, 2019, 8:54am UTC](https://forum.flowable.org/t/execution-time-metrics/4637 "2019-10-04T08:54:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![valentinEmpy](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/valentinempy/32/1380_2.png) [@valentinEmpy](https://forum.flowable.org/u/valentinEmpy)\
**Post date:** [October 4, 2019, 8:54am UTC](https://forum.flowable.org/t/execution-time-metrics/4637/1 "2019-10-04T08:54:42Z")

</div>

Hello Flowable experts,

I have the following situation:  
We have an application that uses primarily flowable to execute its tasks.  
Under very high load (stress), we noticed some occasional increases in the time **between** the execution of one task and another.  
Taking a look at **act\_hi\_actinst** , we noticed **no delay** when investigating the interval between the ‘start\_time’ and the ‘end\_time’ of these tasks.  
However, when we proceeded to add custom metrics in all of our java classes that correspond to these tasks (logging start and end of the task), we noticed that it indeed had some occasional spikes/delay between the tasks.  
I assume this is because the times represented in **act\_hi\_actinst** do not actually match the times of the java classes we execute, as it does bunch of other stuff too (insert, update queries etc.) before it executes the java code and after that, as these are also included in the times. Is my understanding correct?

My question is, is there some flowable mechanism which we could use to acquire metrics (start, end times) for the execution of the actual java classes we provide, only (and not rely on custom logging from our side)?

Regards,  
Valentin

---

<div class="post-metadata">

**Author:** ![valentinEmpy](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/valentinempy/32/1380_2.png) [@valentinEmpy](https://forum.flowable.org/u/valentinEmpy)\
**Post date:** [October 7, 2019, 11:51am UTC](https://forum.flowable.org/t/execution-time-metrics/4637/2 "2019-10-07T11:51:11Z")

</div>

Hi,

Could anyone assist with the above question?

Regards,  
Valentin

---

<div class="post-metadata">

**Author:** ![wwitt](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/wwitt/32/706_2.png) [@wwitt](https://forum.flowable.org/u/wwitt)\
**Post date:** [October 8, 2019, 2:48am UTC](https://forum.flowable.org/t/execution-time-metrics/4637/3 "2019-10-08T02:48:24Z")

</div>

The delays your seeing may be due to writing history synchronously, which is the default in Flowable. If you can turn on async history you may notice a reduction or elimination in the lag spikes.
