We are migrating our application from .NET MVC to OutSystems. In .NET we have generic audit method, it is measuring the method execution time based on build-in OnActionExecuting, OnActionExecuted method. It add logs such UserId, datetime, execution time. Only call this "LogAction" & it will calculate the execution time & log after execution done.
Now we was trying to build similar approach on OS 11. One approach is use local variable, initialize at beginning of the action then at the end calculate execution time which is not generic. Don't refer service center, as it's not suitable for our scenario. We have portal (Dashboard) from where management do analysis, auditing, security inspection based on this log.
Is there any way to achieve this?
Hi Muhammad,
As per my knowledge, we do not have any action available. If you want, you can do it by java script.
//call the execution action
var startTime = Date.now();
//Call your action
$actions.actionname();
var endTime= Date.now();
var Total = endTime - startTime;
console.log(elapsedTime+'ms');
Hi Mithun,
Rather than using JavaScript it's better to use local variable due to maintainability. But this will not bring any advantage as for every action you have to calculate it.
I want some generic approach to calculate execution time just like .NET can.
Okay