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()
}
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 inscala.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:should print: