Skip to content

Commit ecf4e63

Browse files
committed
perf: reduce Java E2E looping time to 5s and cache runtime JAR build
Make TOTAL_LOOPING_TIME configurable via CODEFLASH_LOOPING_TIME env var (defaults to 10s). Set to 5s in Java E2E CI jobs to cut verification time per candidate. Also cache the codeflash-runtime JAR keyed on source hash to skip mvn install when unchanged.
1 parent 151df77 commit ecf4e63

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/ci.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@ jobs:
436436
RETRY_DELAY: 5
437437
EXPECTED_IMPROVEMENT_PCT: ${{ matrix.expected_improvement }}
438438
CODEFLASH_END_TO_END: 1
439+
CODEFLASH_LOOPING_TIME: 5
439440
steps:
440441
- uses: actions/checkout@v6
441442
with:
@@ -469,7 +470,15 @@ jobs:
469470
- name: Install dependencies
470471
run: uv sync
471472

473+
- name: Cache codeflash-runtime JAR
474+
id: runtime-jar-cache
475+
uses: actions/cache@v4
476+
with:
477+
path: ~/.m2/repository/io/codeflash
478+
key: codeflash-runtime-${{ hashFiles('codeflash-java-runtime/pom.xml', 'codeflash-java-runtime/src/**') }}
479+
472480
- name: Build and install codeflash-runtime JAR
481+
if: steps.runtime-jar-cache.outputs.cache-hit != 'true'
473482
run: |
474483
cd codeflash-java-runtime
475484
mvn install -q -DskipTests

codeflash/code_utils/config_consts.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22

3+
import os
34
from enum import Enum
45
from typing import Any, Union
56

@@ -17,7 +18,7 @@
1718
CONCURRENCY_FACTOR = 10 # Number of concurrent executions for concurrency benchmark
1819
MAX_TEST_FUNCTION_RUNS = 50
1920
MAX_CUMULATIVE_TEST_RUNTIME_NANOSECONDS = 100e6 # 100ms
20-
TOTAL_LOOPING_TIME = 10.0 # 10 second candidate benchmarking budget
21+
TOTAL_LOOPING_TIME = float(os.getenv("CODEFLASH_LOOPING_TIME", "10.0")) # candidate benchmarking budget (seconds)
2122
COVERAGE_THRESHOLD = 60.0
2223
MIN_TESTCASE_PASSED_THRESHOLD = 6
2324
REPEAT_OPTIMIZATION_PROBABILITY = 0.1

0 commit comments

Comments
 (0)