Class AbstractTraceInstrumentor
- java.lang.Object
-
- org.eclipse.steady.java.monitor.AbstractInstrumentor
-
- org.eclipse.steady.java.monitor.trace.AbstractTraceInstrumentor
-
- All Implemented Interfaces:
IInstrumentor
- Direct Known Subclasses:
SingleStackTraceInstrumentor,SingleTraceInstrumentor,StackTraceInstrumentor
public abstract class AbstractTraceInstrumentor extends AbstractInstrumentor
Common super class of the two trace instrumentorsSingleTraceInstrumentorandStackTraceInstrumentor. Delegates all class to theTraceCollector.
-
-
Field Summary
-
Fields inherited from class org.eclipse.steady.java.monitor.AbstractInstrumentor
vulasConfiguration
-
-
Constructor Summary
Constructors Constructor Description AbstractTraceInstrumentor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptToInstrument(JavaId _jid, javassist.CtBehavior _behavior, ClassVisitor _cv)Returns true of a given instrumentor accepts to instrument the given Java class, false otherwise.voidawaitUpload()Make the current thread wait until the upload of the information finished.Map<String,Long>getStatistics()Return instrumentor-specific statistics.static Set<ConstructId>merge(Map<String,Set<org.eclipse.steady.shared.json.model.ConstructId>> _map)Merges the constructs of the map into a single HashSet, i.e., unordered.static Set<ConstructId>merge(Map<String,Set<org.eclipse.steady.shared.json.model.ConstructId>> _map, boolean _ordered)Merges the constructs of the map into a single set.voidupladInformation(AbstractGoal _exe, int _batch_size)Saves the information that has been collected by the instrumentor in the context of the givenAbstractGoal.-
Methods inherited from class org.eclipse.steady.java.monitor.AbstractInstrumentor
injectStacktrace, injectUrlAndLoader
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.steady.java.monitor.IInstrumentor
instrument
-
-
-
-
Method Detail
-
upladInformation
public void upladInformation(AbstractGoal _exe, int _batch_size)
Saves the information that has been collected by the instrumentor in the context of the givenAbstractGoal.- Parameters:
_exe- aAbstractGoalobject._batch_size- a int.
-
awaitUpload
public void awaitUpload()
Make the current thread wait until the upload of the information finished.
-
getStatistics
public Map<String,Long> getStatistics()
Return instrumentor-specific statistics.- Returns:
- a
Mapobject.
-
acceptToInstrument
public boolean acceptToInstrument(JavaId _jid, javassist.CtBehavior _behavior, ClassVisitor _cv)
Returns true of a given instrumentor accepts to instrument the given Java class, false otherwise. Accepts every class. Note that the instrumentation involves two levels of filtering: First,DynamicTransformer.transform(ClassLoader, String, Class, java.security.ProtectionDomain, byte[])filters according to class names, JAR names and JAR directory locations. Second, everyIInstrumentorcan apply an additional filter in the implementation of this method. Note that- Parameters:
_jid- aJavaIdobject._behavior- aCtBehaviorobject._cv- aClassVisitorobject.- Returns:
- a boolean.
-
merge
public static final Set<ConstructId> merge(Map<String,Set<org.eclipse.steady.shared.json.model.ConstructId>> _map)
Merges the constructs of the map into a single HashSet, i.e., unordered.
-
merge
public static final Set<ConstructId> merge(Map<String,Set<org.eclipse.steady.shared.json.model.ConstructId>> _map, boolean _ordered)
Merges the constructs of the map into a single set. Returns a TreeSet if _ordered is equal to true, a HashSet otherwise.- Parameters:
_map- aMapobject._ordered- a boolean.- Returns:
- a single set containing all the constructs passed in _map
-
-