Profiling A Simple Application [message #71065] |
Tue, 16 May 2006 21:35 |
Eclipse User |
|
|
|
Originally posted by: luke.lukeshannon.com
I am curious about the memory cost of the replaceAll operation and was
hoping to get some answers using TPTP.
I am confused that I am not seeing String, StringBuffer or Pattern objects
being created in memory when I run my test.
I am running the default profiling settings on a class with a main method
that does this:
for (int i = 0; i < 100000; i++) {
String hamletMod = hamlet.replaceAll("To", "2").replaceAll("and", "&");
System.out.println(hamletMod);
}
In the Basic Memory Analysis -> Instances View I am seeing 80% of my
instances [int], no Strings or StringBuffers or Pattern Classes?
I know this is a pretty vague post but if anyone verify if I am using TPTP
in the correct way to find out the information I am looking for? Any ideas
why I am not seeing some of the classes I expected in the instance report?
Thanks,
Luke
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03223 seconds