ccristian / caliper

Automatically exported from code.google.com/p/caliper
Apache License 2.0
0 stars 0 forks source link

Add the Footprint instrument #270

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
= What steps will reproduce the problem?
1. Declare method with @Footprint annotation
2. There is no notable difference with using that annotation

= What is the expected output? What do you see instead?
Expected to see memory footprint of the returned object.

=What version of the product are you using? On what operating system?
com.google.caliper 1.0-beta-SNAPSHOT

= Please provide any additional information below.
As I see, there is no processing of the @Footprint at the moment, while 
configuration mentions 
"instrument.footprint.class=com.google.caliper.runner.ObjectFootprintInstrument"
,
there is no ObjectFootprintInstrument class in the source control. 

Please close if it not an occasion and footprint instrument is intentionally 
not published.

Original issue reported on code.google.com by cee...@gmail.com on 30 Jul 2013 at 6:01

GoogleCodeExporter commented 9 years ago
The footprint instrument is actually, IMO, one of the most useful instruments 
that we've made, but it's not in the open-source project because it currently 
requires a special build of the JVM in order function properly.  So, we 
stripped out the instrument because it'd be broken for pretty much everybody.  
But, apparently I forgot to strip out the annotation.  Oops.

Fortunately, I believe that there is an implementation that can be created 
using Java agents (just like the allocation instrument).  So, for the time 
being, I'm just going to keep this bug open as the outstanding task to make a 
more portable instrument and to clean up the Footprint annotation.

Original comment by gak@google.com on 30 Jul 2013 at 6:14

GoogleCodeExporter commented 9 years ago
Thx. 
Would you share your opinion about using original MemoryMeasurer from 
http://memory-measurer.googlecode.com with 
java.lang.instrument.Instrumentation.getObjectSize()?
Or is it quite inaccurate to be used in cases Caliper is used for?

Original comment by cee...@gmail.com on 30 Jul 2013 at 9:37

GoogleCodeExporter commented 9 years ago
No, that would be the approach.  A version of that code is actually what is 
used in Caliper now and the author is a Googler.  I'm not sure about the 
accuracy of that agent vs the current approach using the JVMT (I think).  Those 
are the types of things that would have to be verified in order to get the 
instrument released.

Original comment by gak@google.com on 30 Jul 2013 at 9:50

GoogleCodeExporter commented 9 years ago
I happened upon this bug and used MemoryMeasurer instead of Caliper for 
measuring footprint (because caliper just doesn't do it). MemoryMeasurer beats 
out sizeof (http://sizeof.sf.net) in accuracy when trying to measure inner 
classes. So far I haven't found any fault with it, but of course I'm no Googler 
and don't have access to your current solution.

What can we do to help the implementation along?

Original comment by bogusan...@gmail.com on 25 Mar 2014 at 9:00