Splunk AppDynamics

Difference between Self time and total time

CommunityUser
Splunk Employee
Splunk Employee

what is difference between a self time and total time taken ?

when I hover over self-time it says : the amount of time taken in this method only and does not include time spent on any method it called" . What does this mean? 

Any method in code is combination of other method calls so I dont know what self-time represents?

Any explanation?

Labels (1)
0 Karma
1 Solution

Pratik_Maskey
Communicator

The self time and total time are treated as separate if its the last call or there is no sub call( JDBC call or HTTP service call). In your case, the 150 ms is the time taken to execute the call (the other lines of code) including the query execution time.

The execution time will be the total of all the self time.image.pngimage.png

View solution in original post

0 Karma

Pratik_Maskey
Communicator

Hi,

If you refer to call graph self-time is the total time taken for the lines executed within the method and total time represents the time taken for all the invocations within the method (including other method calls).

You can expand the call graph further for the one showing total time.

Self-time is the time taken by a method for all the lines of code within it and excluding the time taken by any other methods which were called inside it.
Total time is the time taken by a method for all the lines of code within it and including the time taken by any other methods called inside it.

e.g.

public void methodA() {
code line 1 -> took 1 ms
methodB() - took 5 ms
code line 2 -> took 1 ms
}

methodA self-time would be 2 ms (time for code line 1 + code line 2)
methodA total time would be 7 ms (if not expanded this will show up, self-time + methodB time)
methodB self-time would be 5 ms

Thanks

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

I have this following method:

public ResultSet executeQuery() throws SQLException {
checkOpen();
try {
return DelegatingResultSet.wrapResultSet(this,((PreparedStatement)_stmt).executeQuery());
}
catch (SQLException e) {
handleException(e);
throw new AssertionError();
}
}

The report shows line 764 which part of the another method not show here. But the method that is called at 764 is shown above. 

image.jpegimage.jpeg

AppD says self time of this method is 150ms and total time of this method is 150ms. There only method calls in this. so what took the self time?  or the self time is the time of the method that called executeQuery( In this case the method that has line 764)

0 Karma

Pratik_Maskey
Communicator

The self time and total time are treated as separate if its the last call or there is no sub call( JDBC call or HTTP service call). In your case, the 150 ms is the time taken to execute the call (the other lines of code) including the query execution time.

The execution time will be the total of all the self time.image.pngimage.png

0 Karma
Get Updates on the Splunk Community!

Why You Can't Miss .conf25: Unleashing the Power of Agentic AI with Splunk & Cisco

The Defining Technology Movement of Our Lifetime The advent of agentic AI is arguably the defining technology ...

Deep Dive into Federated Analytics: Unlocking the Full Power of Your Security Data

In today’s complex digital landscape, security teams face increasing pressure to protect sprawling data across ...

Your summer travels continue with new course releases

Summer in the Northern hemisphere is in full swing, and is often a time to travel and explore. If your summer ...