[jdom-interest] New benchmark
Bradley S. Huffman
hip at a.cs.okstate.edu
Tue Jul 2 14:56:29 PDT 2002
Elliotte Rusty Harold writes:
> I'm not so sure. I don't trust his technique for measuring memory
> usage at all. I've done things like that in the past, and on further
> digging I've always found that semantically insignificant changes can
> produce wild, several hundred percent swings in memory usage,
> sometimes even sending the memory negative. Unfortuantely I don't
> have any better way to measure memory, but I really don't trust
> numbers based on System.freeMemory().
One thing interesting is Dennis Sosnoski tests don't show explosive memory
usage on a large document (he used a document a little over 2M) and his
tests also use Runtime.freeMemory (IIRC), except for the StringBuffer bug
that caused the modify test to go outrageous.
But even his tests sometimes show weird results like negative memory. However
he does warn you in the docs and his reports that getting accurate results
from a VM is damn hard.
I with you, wish there was a better way :(
Brad
More information about the jdom-interest
mailing list