This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.jinspired.probes.Probes; | |
private static final Probes.Name NAME = Probes.name(C.class).name("m").name("b"); | |
private void m() { | |
// ... | |
b: { | |
Probes.Probe p = Probes.begin(NAME); | |
try { | |
// the code execution metered |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.jinspired.probes.spi.*; | |
import org.jinspired.probes.*; | |
import java.lang.reflect.Method; | |
public final class ProviderFactory implements ProbesProviderFactory { | |
public ProbesProvider create() {/*..*/} | |
private static final class Provider implements ProbesProvider { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.jinspired.probes.interceptor.*; | |
import org.jinspired.probes.*; | |
public final class InterceptorFactory implements ProbesInterceptorFactory { | |
public void init(Probes.Environment env) {/*..*/} | |
public ProbesInterceptor create(Probes.Context ctx) {/*..*/} | |
private static final class Interceptor implements ProbesInterceptor { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.jinspired.probes.strategy.*; | |
import org.jinspired.probes.*; | |
public final class StrategyFactory implements ProbesStrategyFactory { | |
public void init(Probes.Environment env) {/*..*/} | |
public ProbesStrategy create(Probes.Context ctx) {/*..*/} | |
private static final class Strategy implements ProbesStrategy { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.jinspired.probes.measure.*; | |
import org.jinspired.probes.*; | |
public final class MeasureFactory implements ProbesMeasureFactory { | |
public void init(Probes.Environment env) {/*..*/} | |
public ProbesMeasure create(Probes.Context context) {/*..*/} | |
private static final class Measure implements ProbesMeasure { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.jinspired.probes.*; | |
public final class Counting { | |
private static final Probes.Name FN_COUNT = Probes.name("fn").name("count"); | |
public Object fn() { | |
//... | |
if(/*...*/) { Probes.context().counter(FN_COUNT).inc(); } | |
//... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java -Dorg.jinspired.probes.spi.factory=<fully-qualified-factory-classname> ... | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
j.s.p.interceptor.enabled=true | |
j.s.p.interceptors=i | |
j.s.p.interceptor.i.factory.class=<fully-qualified-factory-classname> | |
j.s.p.interceptor.i.factory.classpath=<dir-or-lib-factory-classpath> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
j.s.p.strategy.enabled=true | |
j.s.p.strategies=s | |
j.s.p.strategy.s.factory.class=<fully-qualified-factory-classname> | |
j.s.p.strategy.s.factory.classpath=<dir-or-lib-factory-classpath> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
j.s.p.measure.enabled=true | |
j.s.p.measures=s | |
j.s.p.measure.s.factory.class=<fully-qualified-factory-classname> | |
j.s.p.measure.s.factory.classpath=<dir-or-lib-factory-classpath> | |