Tracking the number of put/get methods on Map using the Java API -
how can track number of calls on , put methods on map?.
i have seen somewhere jprofiler
, must know if problem can solved using java api itself.
couple of options come mind.
if don't want change source code of application introspection way go. use profiler method invocations , see how these methods invoked. visualvm, jprofiler , others.
if don't want use external application needs hook in aspect oriented programming. example aspectj. configure aspect method entries , log results.
if want log calls own api can write wrapper around map implementation of choie , log invocations. of course need custom wrapper map related operations.
Comments
Post a Comment