Overview | Package | Class | Deprecated | Index | Help
| Groovy 1.7.6
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## groovy.lang
[Java] Class BenchmarkInterceptor

    java.lang.Object
      groovy.lang.BenchmarkInterceptor

All Implemented Interfaces:
  Interceptor

    public class BenchmarkInterceptor
    extends Object

Interceptor that registers the timestamp of each method call before and after invocation.

Field Summary
`protected Map` | `calls`

Method Summary
`Object` | `afterInvoke(Object object, String methodName, Object[] arguments, Object result)`
`Object` | `beforeInvoke(Object object, String methodName, Object[] arguments)`
`boolean` | `doInvoke()`
`Map` | `getCalls()`
`void` | `reset()`
`List` | `statistic()` @return a list of lines, each item is [methodname, numberOfCalls, accumulatedTime]

Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll

Field Detail

### calls

    protected Map calls

Method Detail

### afterInvoke

    public Object afterInvoke(Object object, String methodName, Object[] arguments, Object result)

### beforeInvoke

    public Object beforeInvoke(Object object, String methodName, Object[] arguments)

### doInvoke

    public boolean doInvoke()

### getCalls

    public Map getCalls()

### reset

    public void reset()

### statistic

    public List statistic()

  Returns:
    a list of lines, each item is [methodname, numberOfCalls, accumulatedTime]

Copyright © 2003-2010 The Codehaus. All rights reserved.