io.citrine:theta

A portable timing library

License

License

GroupId

GroupId

io.citrine
ArtifactId

ArtifactId

theta
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

io.citrine:theta
A portable timing library
Project URL

Project URL

https://github.com/CitrineInformatics/theta
Source Code Management

Source Code Management

http://github.com/CitrineInformatics/theta/tree/master

Download theta

How to add to project

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

Dependencies

compile (4)

Group / Artifact Type Version
com.github.fommil.netlib : all pom 1.1.2
org.scalanlp : breeze_2.12 jar 0.13.2
org.apache.commons : commons-math3 jar 3.6.1
org.scala-lang : scala-library jar 2.12.4

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

theta

Non-dimensional timers for the jvm.

Theta combines simple a simple timer API with a registry of benchmarks that characterize different components of machine performance. The timer results are normalized (non-dimensionalzed) by appropriate benchmark times to create portable explicit thresholds. For example, a numerically intensive code section could be normalized by a compute intensive benchmark. That way, if the underlying machine the test was running on has half the clock frequency as the machine the test was callibrated on, it would still pass.

Theta also performs multiple evaluations of the code block to estimate the error and confidence in the timing. The default will re-run the block until there is 95% confidence that the relative error is less than 5%. Both of these thresholds are adjustable.

Usage examples

def heavyFunction(a: Vector[Double], b: Vector[Double]): Vector[Double] {
  < some expensive stuff >
}

assert(Stopwatch.time({heavyFunction(testA, testB)}, benchmark = "Compute") < 13.8)

Available benchmarks

  • Random number generation benchmark: generate 2^20 random numbers
  • STREAM benchmark: standard memory bandwidth benchmark
io.citrine

Citrine Informatics

Versions

Version
1.0.0
0.2.1
0.2.0
0.1.3