Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion codeflash/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# These version placeholders will be replaced by uv-dynamic-versioning during build.
__version__ = "0.20.0.post634.dev0+2d73cf88"
__version__ = "0.20.0"
10 changes: 5 additions & 5 deletions packages/codeflash/runtime/capture.js
Original file line number Diff line number Diff line change
Expand Up @@ -713,12 +713,12 @@ function capturePerf(funcName, lineId, fn, ...args) {

for (let batchIndex = 0; batchIndex < batchSize; batchIndex++) {
// Check shared time limit BEFORE each iteration
if (shouldLoop && checkSharedTimeLimit()) {
if (!hasExternalLoopRunner && shouldLoop && checkSharedTimeLimit()) {
break;
}

// Check if this invocation has already reached stability
if (getPerfStabilityCheck() && sharedPerfState.stableInvocations[invocationKey]) {
if (!hasExternalLoopRunner && getPerfStabilityCheck() && sharedPerfState.stableInvocations[invocationKey]) {
break;
}

Expand All @@ -727,7 +727,7 @@ function capturePerf(funcName, lineId, fn, ...args) {

// Check if we've exceeded max loops for this invocation
const totalIterations = getTotalIterations(invocationKey);
if (totalIterations > getPerfLoopCount()) {
if (!hasExternalLoopRunner && totalIterations > getPerfLoopCount()) {
break;
}

Expand Down Expand Up @@ -779,7 +779,7 @@ function capturePerf(funcName, lineId, fn, ...args) {
}

// Check stability after accumulating enough samples
if (getPerfStabilityCheck() && runtimes.length >= getPerfMinLoops()) {
if (!hasExternalLoopRunner && getPerfStabilityCheck() && runtimes.length >= getPerfMinLoops()) {
const window = getStabilityWindow();
if (shouldStopStability(runtimes, window, getPerfMinLoops())) {
sharedPerfState.stableInvocations[invocationKey] = true;
Expand All @@ -788,7 +788,7 @@ function capturePerf(funcName, lineId, fn, ...args) {
}

// If we had an error, stop looping
if (lastError) {
if (!hasExternalLoopRunner && lastError) {
break;
}
}
Expand Down
Loading