---
title: "TruffleRunner.Warmup"
description: "A test method can be annotated with Warmup to specify how many warmup iterations of a test should be done before the Truffle tree is compiled."
kind: "annotation interface"
id: "com.oracle.truffle.tck.TruffleRunner$Warmup"
module: "truffle-tck"
version: "25.6.0-elide.4"
canonical: "https://graalvm.elide.help/25.6.0-elide.4/api/truffle-tck/com/oracle/truffle/tck/TruffleRunner.Warmup.html"
---

# @ TruffleRunner.Warmup

[truffle-tck](../../../../index.md) › [com.oracle.truffle.tck](index.md) · Every page: [llms.txt](../../../../llms.txt)

Annotation interface in [`com.oracle.truffle.tck`](index.md). Since 0.25. Nested in [`TruffleRunner`](TruffleRunner.md).

```java
@Retention(RUNTIME)
@Target({METHOD})
public @interface TruffleRunner.Warmup
```

A test method can be annotated with [`Warmup`](TruffleRunner.Warmup.md) to specify how many warmup iterations of a test should be done before the Truffle tree is compiled. If this annotation is missing, the default value of 3 is used.

```java
@Test
@Warmup(5)
public void warmupTest(@Inject(TestExecuteNode.class) CallTarget target) {
    TruffleObject receiver = prepareArgumentValue();
    Object ret = target.call(receiver);
    Assert.assertEquals(expectedRetValue(), ret);
}
```

In this example, the test code will in total be run 6 times. The first 5 iterations are warmup. The [`CallTarget.call`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/CallTarget.html#call%28java.lang.Object...%29) invocation will run in the interpreter, simply calling the [`RootNode.execute`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/nodes/RootNode.html#execute%28com.oracle.truffle.api.frame.VirtualFrame%29) method. This allows the AST to specialize itself before it is compiled.

After warmup, the resulting specialized AST is compiled, and in the final iteration the [`CallTarget`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/CallTarget.html) represents the resulting compiled code.

**See also**

- [`TruffleRunner`](TruffleRunner.md)

## Elements

### value()
<a id="value()"></a>`int value()`. Since 0.25. The number of warmup iterations to run before a test is compiled. Cite: `com/oracle/truffle/tck/TruffleRunner.Warmup.html#value()`
