slachiewicz / caliper

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

isTimeMethod(Method method) -> annotation #199

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
  /**
   * Several instruments look for benchmark methods like {@code timeBlah(int reps)}; this is the
   * centralized code that identifies such methods.
   */
  public static boolean isTimeMethod(Method method) {
    return method.getName().startsWith("time") && Util.isPublic(method);
  }

still feels like a hack.

I suggest to use explicit annotation instead.

Original issue reported on code.google.com by Andrei.Pozolotin on 16 Jan 2013 at 3:05

GoogleCodeExporter commented 9 years ago
There has been discussion about the use of an annotation in the context of 
allowing users to add additional metadata to the benchmark method.  A change 
almost certainly won't be made just for the sake of making it, but I'm 
relatively confident that the utility will warrant it soon enough.

Original comment by gak@google.com on 16 Jan 2013 at 7:23

GoogleCodeExporter commented 9 years ago
great, thank you.

Original comment by Andrei.Pozolotin on 17 Jan 2013 at 2:58

GoogleCodeExporter commented 9 years ago

Original comment by gak@google.com on 25 Feb 2013 at 7:36