DX Application Performance Management

Expand all | Collapse all

Percentage calculation View

Jump to Best Answer
  • 1.  Percentage calculation View

    Posted 12-24-2016 09:07 AM

    Hi,

     

    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

     

    TotaltranscationCount=ParseInt(Success+Error+Warning);

    SuccessCount=parseInt(totalSucessCount) + parseInt(value);

    successPercent=Math.round((parseInt(totalSucessCount)/parseInt(TotaltranscationCount))*100);

     

    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 ==> 3044
    totalWarningCount ==> 145
    totalErrorCount ==> 38
    totalTraxCount ==> 3227
    successPercent ==> 94
    warningPercent ==> 5
    errorPercent ==> 1

     

    I think the calculation is for every 15 seconds. 

     

    Can someone help me what am missing in my script? 

     

    Thanks



  • 2.  Re: Percentage calculation View

    Posted 12-27-2016 02:07 PM

    It should be taking it every 15 seconds.  Can you upload your script?

     

    Adding Hiko_Davis and Guenter_Grossberger for any feedback.



  • 3.  Re: Percentage calculation View
    Best Answer

    Posted 12-27-2016 02:22 PM

    Thanks

     

    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?

     

    Thanks

     

     

    On Dec 28, 2016 12:37 AM, "musma03" <communityadmin@communities-mail.ca.com>



  • 4.  Re: Percentage calculation View

    Posted 01-02-2017 10:55 AM

    Marking this thread as answered and activity will continue in other thread



  • 5.  Re: Percentage calculation View

    Posted 12-27-2016 02:24 PM

    Have explained the scenario and the requirements over there below is the

    link

     

    https://communities.ca.com/message/241947080?commentID=241947080&et=watches.email.thread#comment-241947080

     

     

     

     

    On Dec 28, 2016 12:51 AM, "Vinothkumar Gomu" <vinothkumargomu@gmail.com>