I am running JBOSS server with the deployment of my own classes.Now I started taking some actions on my application Now I would like to know the memory used by my application before and after working in this regard. Please support me in this regard
(Also by calling [runtime.gettimetime]] Has been received ('s methods [totalum ()] (, [.maxmemory ()] (and [.fememory ()] (
Note that this is not an exact art: a new object While creating, other temporary people can be allocated, which will not give you accurate measurements. As we know, Java trash collection is not guaranteed, so you need to Can not tell the objects to eliminate the dead.
If you do research, you will see that most of the code trying to do these measurements is called Runtime.gc () calls and fountains etc. It will be the end of the measurement and to ensure that the measurement is accurate. It will only work on the fixed JMM implementation ...
On the app server / deployed app, you likely only allocate the heap and the GC As gross ma There will be changes in the usage / usage, but this should be enough. [I think you will not implement GC () and sleep in the production code :)]
Comments
Post a Comment