slachiewicz / caliper

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

In new caliper, make sure allocation measurement isn't fragile, and fails fast if it's going to fail #114

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
There should be some kind of check to see if the enviroment variable 
ALLOCATION_JAR has been set.

For example,
if (type == MeasurementType.INSTANCE || type == MeasurementType.MEMORY) {
      String allocationJarFile = System.getenv("ALLOCATION_JAR");
      if (allocationJarFile == null) {
        throw new Error("Enviroment variable ALLOCATION_JAR must be set before --measureMemory option can be used")
      }
}

Current version just fails with

> Failed to execute java -javaagent:null -cp  ....
> Error occurred during initialization of VM
> agent library failed to init: instrument
> Error opening zip file or JAR manifest missing : null

If ALLOCATION_JAR has not been specified. 

Also there is no mention in any of Calipers documentation about the need for 
settings this variable

Original issue reported on code.google.com by kaspe...@gmail.com on 31 Jan 2011 at 6:50

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 19 Mar 2011 at 2:16

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 19 Mar 2011 at 2:45

GoogleCodeExporter commented 9 years ago
need to find out if this still makes sense in new-caliper.  do we still read an 
environment variable?

Original comment by kevinb@google.com on 14 Nov 2011 at 8:52

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 8 Feb 2012 at 9:49

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 1 Nov 2012 at 8:32

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 1 Nov 2012 at 8:42

GoogleCodeExporter commented 9 years ago
I think we're in a much better place with this.  I'm going to mark it fixed.

Original comment by gak@google.com on 11 Apr 2013 at 11:14