we can't collect the "Average CPU Time" based on "com.wily.introscope.agent.trace.MethodCPUTimer", all the time we use "com.wily.introscope.agent.trace.nano.MethodNanoCPUTimer" some metric data will collected.
The only hint we find in the IntroscopeAgent.log is
[ERROR] [IntroscopeAgent.Agent] Attempted to use CPU timing support which is not available
All the time we use the "MethodNanoCPUTimer" everything seems to work well,
with the "MethodCPUTimer" we get the error message and no metric data.
The environment: Windows 10, IBM Java 8 and APM Agent 10.5.1.
The Windows APM Agent package is use, IntroscopeAgentFiles-NoInstaller10.5.1.6default.windows.zip
From what I can determine from a brief search, the MethodCPUTimer appears to rely solely under native calls made by the platform monitor. I have found this internal comment from a few years ago
"BlamedMethodCPUTimer is supported through platform monitors, that is supported though native methods (i.e. non-java code). If you look into introscopeWindowsIntelAmd64Stats.jar you can see that it uses these native methods to actually fetch platform CPU count - Fetching CPU time is not implemented for Windows)."
If you look at the documentation on tracers:
Although it is possibly misleading (references to very old operating systems still, for which I have made a comment), the MethodNanoCPUTimer makes a reference to the JVM, this suggests that it would be possible for us to obtain the CPU information from the JVM and be platform-independent.
This would explain in some way why this tracer could be working where the other one isn't, as the documentation references (old versions of) AIX/Linux, but not Windows.
it seems to me, it's a bad idea to switch from "MethodNanoCPUTimer" to "MethodCPUTimer".
The "MethodNanoCPUTimer" is based on Java only and available on all plattforms therefore.
The reason we try to use "MethodCPUTimer" is, some JVMs wast lots of cpu time and 30% of the cpu time is used by the agent. I thought, we are saving some cpu by using "ms" instead of "ns" timer.
I think we continue using the "MethodNanoCPUTimer" timer.
Hello David,I checked the pbd files and only our pbd files use "MethodNanoCPUTimer".
Can I reduce the resources used by the agent by using "MethodCPUTimer" instead of using the "MethodNanoCPUTimer".
The production environment is Linux and AIX, the "MethodCPUTimer" should be available therefore. Only the development environment is Windows or MacOS.