I have an application that uses OpenCV (in Java) to process images from the
camera in real-time. The processing consists of several steps, wrapped in
separate methods like filtering, thresholding, etc. I would like to have an
estimate of CPU time used by each of the methods to make an estimate of
their energy consumption. I know that I could do something like
1. public long filter(Mat input) {
2. long time = System
<http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+system>
.elapsedRealtime();
3.
4. ...
5.
6. return System
<http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+system>
.elapsedRealtime() - time;
7. }
to get the execution time of each method call but I think since I'd like to
correlate it with energy consumption it would not be precise enough. Is
there some way to maybe get the total CPU time of the current process? (I
know in Android Studio's Energy Profiler I could trace CPU time of methods
but I wanted to know if this is achievable at runtime programmatically)
--
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-developers/dc9532f7-2a7f-4114-8beb-dd3286ee109an%40googlegroups.com.