cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

counting method execution times within a purepath

alex_proano
Participant

I have a requirement to implement a business transaction that
shows the number of times the method 'process' is invoked within a purepath. Here are
the method signatures.

Here is how I defined the invocation measure

Created 2 business transactions to test it (split 1st arg, split 2nd arg)

Here is the purepath tree as recorded by dynatrace.It shows that the method was invoked 8 times.

I added the transactions to a chart

The split with 1st argument shows a count of 1, and the split with 2nd argument shows 8.

Can someone please explain why the count is not 8 for both transactions. Is there something wrong with the count calculation? It looks like it's counting the number of splits rather than the occurrences of the business transaction.

Ideally I would like to use the business transaction with 1st arg. split to show the counts.

Thanks.

3 REPLIES 3

david_n
Inactive

Hello Alex,

It seems like you are well on your way to achieving your requirement. To answer your question as to why the two splits are returning different values you can see the answer in the arguments column of the PurePath screenshot you have attached. The splittings of a Business Transaction determines the dividing factor for how Dynatrace breaks up the elements it is returning. This means that items where the dividing factor (the split result) are the same, they will be marked as one entry. I see that the junitID is the first argument and it is the same for all the process calls, this results in the single split you are seeing. The second argument seems to be a call count and thus constantly changes and produces a more accurate splitting count for your needs.

I hope that helps,

David Nicholls

_JOJO
Dynatrace Helper
Dynatrace Helper

Hello Alex,

The reason for this discrepancy is due to
the number of occurrences that your splitting is based on. Lets break your
business transactions down.

Lets focus on Process(final String
desc, final int loop).
AppMon will look for different values to split
with.

By "ose_poc_process_loop"

Looking at the second argument, you'll have
the argument passed to the method as:

  • 0
  • 1
  • 2
  • ....
  • 7

So that would be 8 different
splittings
, which would be counted as 8.

By "ose_poc_process_desc"

The method would pass the
same description every time,

  • juntid-94bc6702
  • juntid-94bc6702
  • ....
  • juntid-94bc6702

Since we're "splitting" into unique
strings, there is only 1 unique string. which would be counted as 1.

Onto the question: How to get number of
calls per description?

If you want to get the number of calls per description,
we can use what you have!


  1. In Splittings, add/keep "ose_poc_process_desc"
  2. In the Results add "ose_poc_process_loop" , and Aggregate by "Count or Sum"

Thanks for reading,

alex_proano
Participant

I am still a little bit confused because according to the "Advanced Business Transactions video", the Count should be determined by the aggregation in the filter. The video shows a count of 2 for db count.

I ran another test using the same DB count measure, and it still shows a count of 1.

dbcount.png

Does anyone else finds this to be a contradiction?