Skip to content

Commit 10e00f0

Browse files
Merge branch 'main' into sb/channel-underlying-transport
2 parents 3299959 + 2fdda6c commit 10e00f0

File tree

3 files changed

+22
-7
lines changed

3 files changed

+22
-7
lines changed

Benchmarks/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ let package = Package(
99
],
1010
dependencies: [
1111
.package(path: "../"),
12-
.package(url: "https://github.com/ordo-one/package-benchmark.git", from: "1.22.0"),
12+
.package(url: "https://github.com/ordo-one/package-benchmark.git", from: "1.29.11"),
1313
],
1414
targets: [
1515
.executableTarget(

Sources/NIOPosix/SelectableEventLoop.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ internal final class SelectableEventLoop: EventLoop, @unchecked Sendable {
137137
// This may only be read/written while holding the _tasksLock.
138138
internal var _pendingTaskPop = false
139139
@usableFromInline
140-
internal var scheduledTaskCounter = ManagedAtomic<UInt64>(0)
140+
internal let scheduledTaskCounter = ManagedAtomic<UInt64>(0)
141141
@usableFromInline
142142
internal var _scheduledTasks = PriorityQueue<ScheduledTask>()
143143
@usableFromInline

scripts/check_benchmark_thresholds.sh

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,27 @@ swift package --package-path "$benchmark_package_path" "${swift_package_argument
3535
rc="$?"
3636

3737
# Benchmarks are unchanged, nothing to recalculate
38-
if [[ "$rc" == 0 ]]; then
38+
if [[ "$rc" == 0 ]]; then
3939
exit 0
40+
# Benchmark thresholds changed – 2 is defined in
41+
# package-benchmark/BenchmarkShared/Command+Helpers.swift/ExitCode.thresholdRegression
42+
elif [[ "$rc" == 2 ]]; then
43+
log "Recalculating thresholds..."
44+
45+
swift package --package-path "$benchmark_package_path" "${swift_package_arguments[@]}" benchmark thresholds update --format metricP90AbsoluteThresholds --path "${benchmark_package_path}/Thresholds/${swift_version}/"
46+
update_rc="$?"
47+
48+
if [[ "$update_rc" != 0 ]]; then
49+
error "Benchmark failed to run due to build error."
50+
exit $update_rc
51+
fi
52+
53+
echo "=== BEGIN DIFF ===" # use echo, not log for clean output to be scraped
54+
git diff --exit-code HEAD
55+
# all other errors
56+
else
57+
error "Benchmark failed to run due to build error."
58+
exit $rc
4059
fi
4160

42-
log "Recalculating thresholds..."
4361

44-
swift package --package-path "$benchmark_package_path" "${swift_package_arguments[@]}" benchmark thresholds update --format metricP90AbsoluteThresholds --path "${benchmark_package_path}/Thresholds/${swift_version}/"
45-
echo "=== BEGIN DIFF ===" # use echo, not log for clean output to be scraped
46-
git diff --exit-code HEAD

0 commit comments

Comments
 (0)