Avatar for the netresearch user
netresearch
go-cron
BlogDocsChangelog

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

#336
Comparing
jrouzierinverse:fix/race-conditions
(
5305ce6
) with
main
(
24acb27
)
CodSpeed Performance Gauge
-34%
Improvement
6
Regression
2
Untouched
17

Benchmarks

25 total
without_capacity
option_capacity_test.go::BenchmarkWithCapacity_MapOperations::size_1000
CodSpeed Performance Gauge
-34%
6.5 ms9.7 ms
BenchmarkParseStandard
benchmark_test.go
CodSpeed Performance Gauge
-11%
3.4 µs3.8 µs
1000_jobs
benchmark_test.go::BenchmarkCronWithManyJobs
CodSpeed Performance Gauge
×2.2
5 ms2.3 ms
with_capacity
option_capacity_test.go::BenchmarkWithCapacity_MapOperations::size_1000
CodSpeed Performance Gauge
+74%
5.1 ms2.9 ms
with_capacity
option_capacity_test.go::BenchmarkWithCapacity_MapOperations::size_500
CodSpeed Performance Gauge
+42%
1,295.4 µs909.3 µs
BenchmarkAddJob
benchmark_test.go
CodSpeed Performance Gauge
+33%
7.4 µs5.6 µs
without_capacity
option_capacity_test.go::BenchmarkWithCapacity_MapOperations::size_500
CodSpeed Performance Gauge
+22%
1.4 ms1.2 ms
10_jobs
benchmark_test.go::BenchmarkCronWithManyJobs
CodSpeed Performance Gauge
+20%
2.6 µs2.2 µs
without_capacity
option_capacity_test.go::BenchmarkWithCapacity_BulkAdd
CodSpeed Performance Gauge
+7%
1.7 ms1.6 ms
BenchmarkParseWithTimezone
benchmark_test.go
CodSpeed Performance Gauge
+4%
35.1 µs33.8 µs
BenchmarkObservabilityHooks_Overhead
observability_test.go
CodSpeed Performance Gauge
+3%
2.3 µs2.3 µs
without_capacity
option_capacity_test.go::BenchmarkWithCapacity_MapOperations::size_100
CodSpeed Performance Gauge
+3%
193.5 µs188.6 µs
with_capacity
option_capacity_test.go::BenchmarkWithCapacity_BulkAdd
CodSpeed Performance Gauge
+1%
1.5 ms1.5 ms
BenchmarkObservabilityHooks_NilOverhead
observability_test.go
CodSpeed Performance Gauge
+1%
213 ns211 ns
BenchmarkRemoveAtWithIndex
heap_test.go
CodSpeed Performance Gauge
+1%
962 ns957 ns
BenchmarkParseDescriptor
benchmark_test.go
CodSpeed Performance Gauge
0%
239 ns239 ns
BenchmarkChainWrappers
benchmark_test.go
CodSpeed Performance Gauge
0%
28 ns28 ns
BenchmarkNextComplex
benchmark_test.go
CodSpeed Performance Gauge
0%
868 ns869 ns
BenchmarkNextWithTimezone
benchmark_test.go
CodSpeed Performance Gauge
0%
1.2 µs1.2 µs
BenchmarkHeapUpdate
heap_test.go
CodSpeed Performance Gauge
0%
484 ns485 ns
BenchmarkNext
benchmark_test.go
CodSpeed Performance Gauge
0%
2.6 µs2.6 µs
100_jobs
benchmark_test.go::BenchmarkCronWithManyJobs
CodSpeed Performance Gauge
-1%
13.8 µs14 µs
BenchmarkHeapPopPush
heap_test.go
CodSpeed Performance Gauge
-2%
524 ns535 ns
BenchmarkHeapPush
heap_test.go
CodSpeed Performance Gauge
-2%
282.1 µs289.2 µs
with_capacity
option_capacity_test.go::BenchmarkWithCapacity_MapOperations::size_100
CodSpeed Performance Gauge
-5%
180.9 µs190.4 µs

Commits

Click on a commit to change the comparison range
Base
main
24acb27
-33.58%
fix(cron): simplify comment in run()
5305ce6
3 days ago
by jrouzierinverse
© 2026 CodSpeed Technology
Home Terms Privacy Docs