object Instrumentation
An object that controls profiling of instrumented byte-code. The instrumentation is achieved
by using java.lang.instrument
package. The instrumentation agent can be found in
scala.tools.partest.javaagent
package.
At the moment the following classes are being instrumented: * all classes with empty package * all classes from scala package (except for classes responsible for instrumentation)
The canonical way of using instrumentation is have a test-case in files/instrumented
directory.
The following code in main:
import scala.tools.partest.instrumented.Instrumentation._ def main(args: Array[String]): Unit = { startProfiling() // should box the boolean println(true) stopProfiling() printStatistics() }
should print:
true Method call statistics: scala/Predef$.println(Ljava/lang/Object;)V: 1 scala/runtime/BoxesRunTime.boxToBoolean(Z)Ljava/lang/Boolean;: 1
- Source
- Instrumentation.scala
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- Instrumentation
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Type Members
- type Statistics = Map[MethodCallTrace, Int]
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getStatistics: Statistics
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isProfiling(): Boolean
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def printStatistics(stats: Statistics = getStatistics, filter: (MethodCallTrace) ⇒ Boolean = standardFilter): Unit
- def resetProfiling(): Unit
- val standardFilter: (MethodCallTrace) ⇒ Boolean
- def startProfiling(): Unit
- def stopProfiling(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()