hotspot-profiler


License

License

Categories

Categories

React User Interface Web Frameworks
GroupId

GroupId

com.reactific
ArtifactId

ArtifactId

hotspot-profiler_2.11
Last Version

Last Version

0.3.4
Release Date

Release Date

Type

Type

jar
Description

Description

hotspot-profiler
hotspot-profiler
Project URL

Project URL

https://github.com/reactific/hotspot-profiler
Project Organization

Project Organization

Reactific Software LLC
Source Code Management

Source Code Management

https://github.com/reactific/hotspot-profiler

Download hotspot-profiler_2.11

How to add to project

<!-- https://jarcasting.com/artifacts/com.reactific/hotspot-profiler_2.11/ -->
<dependency>
    <groupId>com.reactific</groupId>
    <artifactId>hotspot-profiler_2.11</artifactId>
    <version>0.3.4</version>
</dependency>
// https://jarcasting.com/artifacts/com.reactific/hotspot-profiler_2.11/
implementation 'com.reactific:hotspot-profiler_2.11:0.3.4'
// https://jarcasting.com/artifacts/com.reactific/hotspot-profiler_2.11/
implementation ("com.reactific:hotspot-profiler_2.11:0.3.4")
'com.reactific:hotspot-profiler_2.11:jar:0.3.4'
<dependency org="com.reactific" name="hotspot-profiler_2.11" rev="0.3.4">
  <artifact name="hotspot-profiler_2.11" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.reactific', module='hotspot-profiler_2.11', version='0.3.4')
)
libraryDependencies += "com.reactific" % "hotspot-profiler_2.11" % "0.3.4"
[com.reactific/hotspot-profiler_2.11 "0.3.4"]

Dependencies

compile (2)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.11.8
org.slf4j : slf4j-api jar 1.7.25

test (2)

Group / Artifact Type Version
ch.qos.logback : logback-classic jar 1.2.3
org.specs2 : specs2-core_2.11 jar 3.9.5

Project Modules

There are no modules declared in this project.

License Build Status Coverage Status Release Downloads Join the chat at https://gitter.im/reactific/hotspot-profiler

Reactific HotSpot Profiler

This is a very simplistic tool aimed at focusing in on a particular hot spot where sampled profiling just isn't good enough. It is quite simple to use, just like this:

import com.reactific.hsp.Profiler

def myHotSpot = Profiler.profile("myHotSpot") {
  ...
}

The execution time of myHotSpot will be recorded, separately in each thread. After the test is over, you can write code to extract the results. To get a simple summary of the values, you can:

val (count, sum) = Profiler.get_one_item("myHotSpot")

to extract the number of invocations (count) and the sum of the execution times (sum) for the myHotSpot function. If you need fancier reporting you can also do something like:

log.debug(s"Profiling Results:\n${Profiler.format_profile_data.toString()}")

to print out all the results in a nested format for each thread.

Overhead is about 50 microseconds for each Profiler.profile call if profiling is enabled. When it is disabled, overhead is exactly one boolean dereference in an if statement and a function call (minimal).

com.reactific

Reactific Software LLC

Versions

Version
0.3.4
0.3.2
0.3.1
0.3.0