Avatar for the netresearch user
netresearch
go-cron
BlogDocsChangelog

fix(cron): avoid race condition in Entry/EntryByName and ScheduleJob

#336Merged
Comparing
jrouzierinverse:fix/race-conditions
(
ccea108
) with
main
(
fb74a8f
)
CodSpeed Performance Gauge
-34%
Improvement
2
Regression
3
Untouched
20

Benchmarks

25 total
without_capacity
option_capacity_test.go::BenchmarkWithCapacity_MapOperations::size_1000
CodSpeed Performance Gauge
-34%
5.7 ms8.7 ms
10_jobs
benchmark_test.go::BenchmarkCronWithManyJobs
CodSpeed Performance Gauge
-19%
2.5 µs3.1 µs
100_jobs
benchmark_test.go::BenchmarkCronWithManyJobs
CodSpeed Performance Gauge
-18%
13.8 µs16.8 µs
with_capacity
option_capacity_test.go::BenchmarkWithCapacity_MapOperations::size_500
CodSpeed Performance Gauge
+58%
2 ms1.3 ms
BenchmarkHeapPush
heap_test.go
CodSpeed Performance Gauge
+20%
346.2 µs287.9 µs
BenchmarkParseDescriptor
benchmark_test.go
CodSpeed Performance Gauge
+1%
239 ns237 ns
with_capacity
option_capacity_test.go::BenchmarkWithCapacity_MapOperations::size_100
CodSpeed Performance Gauge
+1%
209 µs207.6 µs
BenchmarkObservabilityHooks_NilOverhead
observability_test.go
CodSpeed Performance Gauge
0%
213 ns212 ns
BenchmarkHeapUpdate
heap_test.go
CodSpeed Performance Gauge
0%
479 ns478 ns
BenchmarkChainWrappers
benchmark_test.go
CodSpeed Performance Gauge
0%
28 ns28 ns
BenchmarkNextComplex
benchmark_test.go
CodSpeed Performance Gauge
0%
868 ns868 ns
BenchmarkNext
benchmark_test.go
CodSpeed Performance Gauge
0%
2.6 µs2.6 µs
BenchmarkObservabilityHooks_Overhead
observability_test.go
CodSpeed Performance Gauge
0%
2.4 µs2.4 µs
BenchmarkHeapPopPush
heap_test.go
CodSpeed Performance Gauge
0%
526 ns527 ns
BenchmarkRemoveAtWithIndex
heap_test.go
CodSpeed Performance Gauge
0%
959 ns961 ns
BenchmarkParseWithTimezone
benchmark_test.go
CodSpeed Performance Gauge
0%
33.4 µs33.6 µs
BenchmarkNextWithTimezone
benchmark_test.go
CodSpeed Performance Gauge
-1%
1.2 µs1.2 µs
BenchmarkParseStandard
benchmark_test.go
CodSpeed Performance Gauge
-1%
3.3 µs3.4 µs
BenchmarkAddJob
benchmark_test.go
CodSpeed Performance Gauge
-3%
5.4 µs5.6 µs
1000_jobs
benchmark_test.go::BenchmarkCronWithManyJobs
CodSpeed Performance Gauge
-3%
3.2 ms3.3 ms
without_capacity
option_capacity_test.go::BenchmarkWithCapacity_BulkAdd
CodSpeed Performance Gauge
-3%
1.6 ms1.6 ms
with_capacity
option_capacity_test.go::BenchmarkWithCapacity_BulkAdd
CodSpeed Performance Gauge
-4%
1.5 ms1.5 ms
without_capacity
option_capacity_test.go::BenchmarkWithCapacity_MapOperations::size_500
CodSpeed Performance Gauge
-4%
2 ms2.1 ms
with_capacity
option_capacity_test.go::BenchmarkWithCapacity_MapOperations::size_1000
CodSpeed Performance Gauge
-8%
4.9 ms5.3 ms
without_capacity
option_capacity_test.go::BenchmarkWithCapacity_MapOperations::size_100
CodSpeed Performance Gauge
-10%
198.9 µs220.7 µs

Commits

Click on a commit to change the comparison range
Base
main
fb74a8f
-33.55%
fix(cron): deep copy Entry.Tags to prevent external mutation
ccea108
24 days ago
by jrouzierinverse
© 2026 CodSpeed Technology
Home Terms Privacy Docs