Can someone help me with percentage calculation script?
I have written a java script to calculate the percentage for particular operations which is already reporting. Like i have need to calculate success(%), Error(%) and Warning(%). Have written a script based on below calculation and its reporting in investigator successfully
SuccessCount=parseInt(totalSucessCount) + parseInt(value);
Similarly for Error and Warning Percentage.
The issue is whenever am viewing in investigator, i can see Success Percentage as 99%, Error as 4% and Warning as 12%.
Ideally the sum of all these percentage should be 100%. Am sure my percentage calculation is correct. Have enabled the logging and checked the logs from back end it shows correctly as below or similar. I looked for particular time interval say 1hour and live also both show wrongly.
totalSucessCount ==> 3044totalWarningCount ==> 145totalErrorCount ==> 38totalTraxCount ==> 3227successPercent ==> 94warningPercent ==> 5errorPercent ==> 1
I think the calculation is for every 15 seconds.
Can someone help me what am missing in my script?
It should be taking it every 15 seconds. Can you upload your script?
Adding Hiko_Davis and Guenter_Grossberger for any feedback.
It's issue with the script which I found it later, proper iteration was not
happening for each operation. Have marked this as assumed answered and
opened a new thread. Since am not familiar with Java script, could you
please take a look at it and help me with script?
On Dec 28, 2016 12:37 AM, "musma03" <email@example.com>
Marking this thread as answered and activity will continue in other thread
Have explained the scenario and the requirements over there below is the
On Dec 28, 2016 12:51 AM, "Vinothkumar Gomu" <firstname.lastname@example.org>