From e2dd5f4231b6d00efde665a2cbf9261a47639f69 Mon Sep 17 00:00:00 2001 From: fahimfaisaal Date: Sat, 24 Oct 2026 21:35:54 +0600 Subject: [PATCH] feat: benchmark suites, dashboard worker and results pool/, redis/ and sqlite/ modules, each with its own Taskfile, README and committed bench/*.txt from the 2026-10-24 run on varmq 415ad73 (replace directive), redisq v1.5.0 and sqliteq v0.3.0. One vizb lazy-catalog page served by a Cloudflare Worker at benchmarks.goptics.org with /dataset and /dataset/; CI builds with task + vizb and deploys with wrangler from main. Carried over from goptics/varmq-benchmarks#4 as one commit. Co-Authored-By: Claude Fable 5.1 --- .github/workflows/site.yml | 35 ++ .gitignore | 22 ++ Taskfile.yml | 103 ++++++ pool/README.md | 161 +++++++++ pool/Taskfile.yml | 18 + pool/bench/pool-24cpu.txt | 501 ++++++++++++++++++++++++++ pool/bench/pool-4cpu.txt | 501 ++++++++++++++++++++++++++ pool/bench/pool-8cpu.txt | 501 ++++++++++++++++++++++++++ pool/benchmark_test.go | 59 ++++ pool/go.mod | 23 ++ pool/go.sum | 29 ++ pool/subjects.go | 173 +++++++++ pool/types.go | 62 ++++ redis/README.md | 705 +++++++++++++++++++++++++++++++++++++ redis/Taskfile.yml | 25 ++ redis/asynq.go | 79 +++++ redis/bench/redis.txt | 156 ++++++++ redis/benchmark_test.go | 101 ++++++ redis/compose.yml | 13 + redis/go.mod | 43 +++ redis/go.sum | 241 +++++++++++++ redis/gocraft.go | 69 ++++ redis/gocraft_test.go | 115 ++++++ redis/harness_test.go | 226 ++++++++++++ redis/rmq.go | 114 ++++++ redis/rmq_test.go | 45 +++ redis/subjects.go | 40 +++ redis/subjects_test.go | 199 +++++++++++ redis/taskq.go | 119 +++++++ redis/taskq_test.go | 51 +++ redis/types.go | 171 +++++++++ redis/types_test.go | 99 ++++++ redis/varmq.go | 55 +++ redis/varmq_distributed.go | 47 +++ sqlite/README.md | 83 +++++ sqlite/Taskfile.yml | 16 + sqlite/bench/sqlite.txt | 16 + sqlite/benchmark_test.go | 27 ++ sqlite/go.mod | 11 + sqlite/go.sum | 12 + sqlite/harness_test.go | 362 +++++++++++++++++++ sqlite/store.go | 45 +++ worker/worker.js | 18 + worker/wrangler.jsonc | 12 + 44 files changed, 5503 insertions(+) create mode 100644 .github/workflows/site.yml create mode 100644 .gitignore create mode 100644 Taskfile.yml create mode 100644 pool/README.md create mode 100644 pool/Taskfile.yml create mode 100644 pool/bench/pool-24cpu.txt create mode 100644 pool/bench/pool-4cpu.txt create mode 100644 pool/bench/pool-8cpu.txt create mode 100644 pool/benchmark_test.go create mode 100644 pool/go.mod create mode 100644 pool/go.sum create mode 100644 pool/subjects.go create mode 100644 pool/types.go create mode 100644 redis/README.md create mode 100644 redis/Taskfile.yml create mode 100644 redis/asynq.go create mode 100644 redis/bench/redis.txt create mode 100644 redis/benchmark_test.go create mode 100644 redis/compose.yml create mode 100644 redis/go.mod create mode 100644 redis/go.sum create mode 100644 redis/gocraft.go create mode 100644 redis/gocraft_test.go create mode 100644 redis/harness_test.go create mode 100644 redis/rmq.go create mode 100644 redis/rmq_test.go create mode 100644 redis/subjects.go create mode 100644 redis/subjects_test.go create mode 100644 redis/taskq.go create mode 100644 redis/taskq_test.go create mode 100644 redis/types.go create mode 100644 redis/types_test.go create mode 100644 redis/varmq.go create mode 100644 redis/varmq_distributed.go create mode 100644 sqlite/README.md create mode 100644 sqlite/Taskfile.yml create mode 100644 sqlite/bench/sqlite.txt create mode 100644 sqlite/benchmark_test.go create mode 100644 sqlite/go.mod create mode 100644 sqlite/go.sum create mode 100644 sqlite/harness_test.go create mode 100644 sqlite/store.go create mode 100644 worker/worker.js create mode 100644 worker/wrangler.jsonc diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml new file mode 100644 index 0000000..cd58fc3 --- /dev/null +++ b/.github/workflows/site.yml @@ -0,0 +1,35 @@ +name: site +on: + push: + branches: [main] + paths: ["*/bench/*.txt", "Taskfile.yml", "worker/**", ".github/workflows/site.yml"] + pull_request: + paths: ["*/bench/*.txt", "Taskfile.yml", "worker/**", ".github/workflows/site.yml"] + workflow_dispatch: + +concurrency: + group: site + cancel-in-progress: false + +jobs: + site: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - if: hashFiles('pool/bench/*.txt', 'redis/bench/*.txt', 'sqlite/bench/*.txt') == '' + run: echo "::notice::no bench txt on this ref yet, nothing to build" + - if: hashFiles('pool/bench/*.txt', 'redis/bench/*.txt', 'sqlite/bench/*.txt') != '' + run: | + sh -c "$(curl -fsSL https://taskfile.dev/install.sh)" -- -d -b "$HOME/.local/bin" v3.50.0 + VIZB_RELEASE_TAG=v0.23.0 bash -c "$(curl -fsSL https://vizb.goptics.org/install.sh)" + echo "$HOME/.local/bin" >> "$GITHUB_PATH" + - if: hashFiles('pool/bench/*.txt', 'redis/bench/*.txt', 'sqlite/bench/*.txt') != '' + run: task site:build + - if: hashFiles('pool/bench/*.txt', 'redis/bench/*.txt', 'sqlite/bench/*.txt') != '' && github.event_name != 'pull_request' && github.ref == 'refs/heads/main' + uses: cloudflare/wrangler-action@v3 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + workingDirectory: worker + wranglerVersion: "4" + command: deploy diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8435898 --- /dev/null +++ b/.gitignore @@ -0,0 +1,22 @@ +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Build directory +bin/ +dist/ +worker/public/ +worker/.wrangler/ +worker/node_modules/ + +# Profile files +*.prof diff --git a/Taskfile.yml b/Taskfile.yml new file mode 100644 index 0000000..b7cf494 --- /dev/null +++ b/Taskfile.yml @@ -0,0 +1,103 @@ +version: "3" + +includes: + pool: { taskfile: pool/Taskfile.yml, dir: pool } + redis: { taskfile: redis/Taskfile.yml, dir: redis } + sqlite: { taskfile: sqlite/Taskfile.yml, dir: sqlite } + +vars: + PUBLIC: worker/public + DATA: worker/public/data + DATA_URL: https://benchmarks.goptics.org/dataset + BAR: vizb bar -p /n/y/x -T s -M MB --round -l --border-radius 8,8,0,0 + # keep in step with redis/subjects.go: a subject missing here is dropped from redis-persistent + SUBJECTS: '(VarMQ|Asynq|Rmq|Taskq|GocraftWork)' + # catalog order = dashboard order; listed literally (a glob sorts 4cpu before 24cpu) + JSONS: >- + worker/public/data/pool-24cpu.json worker/public/data/pool-8cpu.json worker/public/data/pool-4cpu.json + worker/public/data/redis-persistent.json worker/public/data/redis-distributed.json + worker/public/data/sqlite-persistent.json + +tasks: + default: + cmds: + - task --list + + site:json: + desc: Convert every bench txt to dataset JSON plus the catalog + cmds: + - rm -rf {{.DATA}} && mkdir -p {{.DATA}} + - '{{.BAR}} --stack pool/bench/pool-24cpu.txt -n "Pool (24 CPUs)" --id pool-24cpu -d "9 Go worker pools, 5 workload shapes, 1M tasks, GOMAXPROCS 24" -o {{.DATA}}/pool-24cpu.json' + - '{{.BAR}} --stack pool/bench/pool-8cpu.txt -n "Pool (8 CPUs)" --id pool-8cpu -d "Same matrix at GOMAXPROCS 8" -o {{.DATA}}/pool-8cpu.json' + - '{{.BAR}} --stack pool/bench/pool-4cpu.txt -n "Pool (4 CPUs)" --id pool-4cpu -d "Same matrix at GOMAXPROCS 4" -o {{.DATA}}/pool-4cpu.json' + - >- + {{.BAR}} redis/bench/redis.txt -n "Redis (Persistent)" --id redis-persistent + -d "One consumer process: VarMQ persistent queue vs Asynq, rmq, taskq, gocraft/work; plus enqueue-only and pickup latency" + -f '^(Benchmark)?(Durable/[^/]+C1|Enqueue/Enqueue|Latency/[^/]+)/[^/]+/{{.SUBJECTS}}$' + --better p50-ms:low,p99-ms:low,max-ms:low + -o {{.DATA}}/redis-persistent.json + - >- + {{.BAR}} redis/bench/redis.txt -n "Redis (Distributed)" --id redis-distributed + -d "Four consumer processes: VarMQ distributed queue vs Asynq, rmq, taskq, gocraft/work" + -f '^(Benchmark)?Durable/[^/]+C4/' + -o {{.DATA}}/redis-distributed.json + - >- + {{.BAR}} sqlite/bench/sqlite.txt -n "Sqlite (Persistent)" --id sqlite-persistent + -d "sqliteq through a VarMQ worker: one queue, drain, priority, ten queues; WAL checkpoint 1000 vs 10000 pages" + --better walMB:low -o {{.DATA}}/sqlite-persistent.json + - jq -se 'all(.data | length > 0)' {{.JSONS}} + - jq -s 'map({id, name})' {{.JSONS}} > {{.DATA}}/_catalog.json + + site:html: + desc: Build the lazy-catalog page against DATA_URL + cmds: + - mkdir -p {{.PUBLIC}} + - vizb ui -c bar --data-url {{.DATA_URL}} -o {{.PUBLIC}}/index.html + + site:build: + desc: json + html, what CI runs before wrangler deploy + cmds: + - task: site:json + - task: site:html + vars: { DATA_URL: '{{.DATA_URL}}' } + + site:preview: + desc: Same six datasets embedded in one HTML, no Worker + cmds: + - task: site:json + - mkdir -p dist + - jq -s . {{.JSONS}} > dist/all.json + - vizb ui -c bar dist/all.json -o dist/index.html + - cmd: xdg-open dist/index.html + platforms: [linux] + - cmd: open dist/index.html + platforms: [darwin] + + site:dev: + desc: Build against localhost:8787 and run wrangler dev + cmds: + - task: site:build + vars: { DATA_URL: http://localhost:8787/dataset } + - cd worker && npx -y wrangler@4 dev + + site:deploy: + desc: Production build then deploy (CI does the same) + cmds: + - task: site:build + - cd worker && npx -y wrangler@4 deploy + + report: + desc: Run every suite (hours), then open the local preview + cmds: + - task: redis:up + - task: pool:txt + - task: redis:txt + - task: redis:down + - task: sqlite:txt + - task: site:preview + + clean: + desc: Remove dist, the built site and local build artifacts + cmds: + - rm -rf dist {{.PUBLIC}} worker/.wrangler + - find . -name '*.prof' -o -name '*.test' | xargs rm -f diff --git a/pool/README.md b/pool/README.md new file mode 100644 index 0000000..6cd4ad9 --- /dev/null +++ b/pool/README.md @@ -0,0 +1,161 @@ +# Pool benchmarks + +Nine Go worker pools driven by one harness across five workload shapes and four task types, 1M tasks per run. VarMQ is raced against Pond, Ants, WorkerPool, Conc, ErrGroup, Gopool and two hand-rolled channel baselines. + +This module is `package main` with its own `go.mod`. Run everything from this directory, or from the repo root as `task pool:`. + +## Run + +| Task | What it does | +|------|--------------| +| `task pool:test` | `go vet` and `go test` | +| `task pool:bench` | Every benchmark once (`-benchtime=1x`) | +| `task pool:txt` | Full matrix at 24, 8 and 4 CPUs into `bench/pool-24cpu.txt`, `bench/pool-8cpu.txt` and `bench/pool-4cpu.txt` (hours) | + +One slice, for example the pool of one worker (about 40 s): + +```bash +go test -run xxx -bench 'Tasks/W1$' -benchtime=1x +``` + +Loop10 task, 50K workers, 100 producers, only the baselines: + +```bash +go test -run xxx -bench 'Tasks/Loop10W50K/100u-10Kt/(GoroutinePool|BufferedPool)$' -benchtime=1x +``` + +One pool size, here 100K workers (also `W50K`, `W300K`): + +```bash +go test -run xxx -bench 'Tasks/W100K$' -benchtime=1x +``` + +## Results + +`bench/pool-24cpu.txt`, `pool-8cpu.txt` and `pool-4cpu.txt` are one run from +2026-10-24: varmq 415ad73 (unreleased, through the `replace` directive in +`go.mod`), `-benchtime=2x`, 495 rows each. Counting the fastest pool per row +over the 55 rows of each file (11 task and size groups x 5 workloads): VarMQ is +first in 40 rows at 24 CPUs, 36 at 8 and 20 at 4; BufferedPool takes 13, 13 +and 20; ErrGroup 2, 6 and 11; Ants 4 at 4 CPUs. The one-worker `Loop10W1` +rows are the consistent loss, where VarMQ runs at about a quarter of +BufferedPool: with no parallelism the hand-off cost is all there is. + +## Subjects + +| Name | What it is | +|------|------------| +| **VarMQ** | [goptics/varmq](https://github.com/goptics/varmq), worker bound to a queue | +| **Pond** | [alitto/pond](https://github.com/alitto/pond) v2 | +| **Ants** | [panjf2000/ants](https://github.com/panjf2000/ants) v2 | +| **WorkerPool** | [gammazero/workerpool](https://github.com/gammazero/workerpool) | +| **Conc** | [sourcegraph/conc](https://github.com/sourcegraph/conc) `pool` with a goroutine cap | +| **ErrGroup** | [x/sync/errgroup](https://pkg.go.dev/golang.org/x/sync/errgroup) with `SetLimit`. Not a pool: a new goroutine per task behind a semaphore, the stdlib-adjacent default many projects reach for | +| **Gopool** | [bytedance/gopkg](https://github.com/bytedance/gopkg) `util/gopool`. Tasks go to an unbounded list, so `submit` never blocks; idle workers exit on their own. The worker cap is soft and can overshoot slightly under contention | +| **GoroutinePool** | N goroutines reading from an **unbuffered** channel. Baseline. | +| **BufferedPool** | Same, but the channel holds 1M tasks. Baseline. | + +All subjects live in [subjects.go](subjects.go). + +## Dimensions + +Every subject is run across the full product of these axes, except that a pool of one worker runs only the CPU tasks (see **Pool size**): + +**Workload shape** (producers x tasks per producer, always 1M tasks total) + +| Name | Producers | Tasks each | +|------|-----------|------------| +| `1u-1Mt` | 1 | 1,000,000 | +| `100u-10Kt` | 100 | 10,000 | +| `1Ku-1Kt` | 1,000 | 1,000 | +| `10Ku-100t` | 10,000 | 100 | +| `1Mu-1t` | 1,000,000 | 1 | + +**Task type** + +| Name | Behaviour | +|------|-----------| +| `Sleep10ms` | I/O-like: sleep 10 ms | +| `Loop10` | CPU-like: 10 iterations of trivial math | +| `Sleep5msLoop5` | Mixed: 5 iterations then sleep 5 ms | +| `Loop10K` | CPU-like: 10,000 iterations, about 1 µs. Pool of 1 only. | + +**Pool size** + +| Size | Tasks | What it shows | +|------|-------|---------------| +| 50K workers | `Sleep10ms`, `Loop10`, `Sleep5msLoop5` | How the pool scales when work can run in parallel | +| 100K workers | `Sleep10ms`, `Loop10`, `Sleep5msLoop5` | The same, with twice the goroutines to spawn and schedule | +| 300K workers | `Sleep10ms`, `Loop10`, `Sleep5msLoop5` | The same, at six times the 50K size | +| 1 worker | `Loop10`, `Loop10K` | What each pool costs per task: submit, hand-off and wake-up, with no parallelism to hide it | + +A pool of one runs no sleeping tasks: every pool would show the same `time.Sleep`, and one worker sleeping 10 ms per task needs almost three hours for 1M tasks. Sizes and their tasks live in `poolSizes` in [subjects.go](subjects.go). + +**CPU count**: results are recorded for the machine default (24 cores on the reference machine), 8 cores and 4 cores (`-cpu` flag). + +## Benchmark names + +Every row is named `BenchmarkTasks/W//`, where `W` stands for workers and sizes in thousands end in `K` (`W50K`, `W100K`, `W300K`, `W1`), in the same style as the workload names: + +| Row | Task | Pool size | Workload | Pool | +|-----|------|-----------|----------|------| +| `BenchmarkTasks/Loop10W50K/100u-10Kt/VarMQ` | `Loop10` | 50,000 workers | 100 producers x 10K tasks | VarMQ | +| `BenchmarkTasks/Sleep10msW300K/1Mu-1t/Pond` | `Sleep10ms` | 300,000 workers | 1M producers x 1 task | Pond | +| `BenchmarkTasks/Loop10KW1/1u-1Mt/Ants` | `Loop10K` | 1 worker | 1 producer x 1M tasks | Ants | + +## Metrics + +Each benchmark reports the standard Go numbers plus throughput: + +- `ns/op`: wall time to push all 1M tasks through the pool and drain it +- `ops/s`: tasks completed per second (custom metric, higher is better) +- `B/op` and `allocs/op`: memory cost + +On a `W1` row there is no parallelism, so `ns/op` divided by 1,000,000 is the time per task: the task itself plus everything the pool adds to it. + +## How it works + +``` +subjects.go types.go benchmark_test.go +┌──────────────┐ ┌──────────────┐ ┌──────────────────────────────┐ +│ VarMQ │ │ poolSubmit │ │ for each pool size │ +│ Pond │ ──▶ │ poolTeardown │ ──▶│ for each of its task types │ +│ Ants │ │ workload │ │ for each workload │ +│ WorkerPool │ │ TaskConfig │ │ for each subject │ +│ Conc │ │ │ │ │ +│ ErrGroup │ └──────────────┘ │ spawn producers │ +│ Gopool │ │ submit, wait, teardown│ +│ GoroutinePool│ │ │ +│ BufferedPool │ │ │ +└──────────────┘ └──────────────────────────────┘ +``` + +1. **A subject is a factory.** Given `maxWorkers`, it returns `submit(task)` and `teardown()`. Nothing else leaks into the harness. +2. **Producers are goroutines.** For a `100u-10Kt` run the harness starts 100 goroutines, each calling `submit` 10,000 times. A `WaitGroup` counts task completions. +3. **One iteration = full lifecycle.** Build the pool, push 1M tasks, wait for all to finish, tear the pool down. Pool construction and shutdown are deliberately inside the timed region. +4. **Results go to text, text goes to charts.** `task pool:txt` saves `go test -bench` output to `bench/pool-24cpu.txt`, `bench/pool-8cpu.txt` and `bench/pool-4cpu.txt`. The root `task site:build` turns each file into a dataset with [Vizb](https://github.com/goptics/vizb). + +## Adding a pool + +Append an entry to `subjects` in [subjects.go](subjects.go): + +```go +{ + name: "MyPool", + factory: func(maxWorkers int) (poolSubmit, poolTeardown) { + p := mypool.New(maxWorkers) + return p.Submit, p.StopAndWait + }, +}, +``` + +That is the whole integration. The harness picks it up on the next run. The factory is called with every pool size in `poolSizes`, including `1`, so it must work with a single worker. + +## Reading the charts + +- Chart groups are named after the task and pool size, for example `Loop10W50K` or `Loop10W1`. Inside a group, bars are grouped by workload shape, then by subject. +- The `W50K`, `W100K` and `W300K` groups show how each pool scales with parallel work; comparing the same group across sizes shows what more workers cost or buy. The `W1` groups show what each pool costs per task, with nothing running in parallel to hide it. +- Hover a bar for exact `ns/op`, `ops/s` and memory values. +- The 24, 8 and 4 CPU runs are separate datasets (`pool-24cpu`, `pool-8cpu`, `pool-4cpu`) in the dataset switcher, so you can see how each pool scales down. +- Compare each library against **GoroutinePool** first. The gap to that baseline is the real overhead of the library. +- **ErrGroup** shows what skipping a pool costs: no worker reuse, one goroutine spawned per task. A pool that loses to it adds overhead without saving any. diff --git a/pool/Taskfile.yml b/pool/Taskfile.yml new file mode 100644 index 0000000..9cbd2a5 --- /dev/null +++ b/pool/Taskfile.yml @@ -0,0 +1,18 @@ +version: "3" +tasks: + test: + desc: Vet and compile + cmds: + - go vet ./... + - go test ./... + bench: + desc: Every benchmark once + cmds: + - go test -run xxx -bench . -benchtime=1x -benchmem + txt: + desc: Full matrix at 24, 8 and 4 CPUs into bench/ (hours) + cmds: + - mkdir -p bench + - set -o pipefail; go test -run xxx -bench . -benchtime=2x -benchmem -cpu=24 -timeout 0 | tee bench/pool-24cpu.txt + - set -o pipefail; go test -run xxx -bench . -benchtime=2x -benchmem -cpu=8 -timeout 0 | tee bench/pool-8cpu.txt + - set -o pipefail; go test -run xxx -bench . -benchtime=2x -benchmem -cpu=4 -timeout 0 | tee bench/pool-4cpu.txt diff --git a/pool/bench/pool-24cpu.txt b/pool/bench/pool-24cpu.txt new file mode 100644 index 0000000..c7103e4 --- /dev/null +++ b/pool/bench/pool-24cpu.txt @@ -0,0 +1,501 @@ +goos: linux +goarch: amd64 +pkg: github.com/goptics/benchmarks/pool +cpu: 13th Gen Intel(R) Core(TM) i7-13700 +BenchmarkTasks/Sleep10msW50K/1u-1Mt/VarMQ-24 2 327380012 ns/op 3054554 ops/s 137567512 B/op 1461751 allocs/op +BenchmarkTasks/Sleep10msW50K/1u-1Mt/Ants-24 2 686303311 ns/op 1457082 ops/s 26577928 B/op 300629 allocs/op +BenchmarkTasks/Sleep10msW50K/1u-1Mt/WorkerPool-24 2 1591327816 ns/op 628406 ops/s 2790272 B/op 37679 allocs/op +BenchmarkTasks/Sleep10msW50K/1u-1Mt/Conc-24 2 720627979 ns/op 1387679 ops/s 10921752 B/op 184962 allocs/op +BenchmarkTasks/Sleep10msW50K/1u-1Mt/ErrGroup-24 2 487406496 ns/op 2051676 ops/s 136593192 B/op 3001356 allocs/op +BenchmarkTasks/Sleep10msW50K/1u-1Mt/Gopool-24 2 953053563 ns/op 1049259 ops/s 90427468 B/op 1707301 allocs/op +BenchmarkTasks/Sleep10msW50K/1u-1Mt/GoroutinePool-24 2 606618030 ns/op 1648484 ops/s 9644168 B/op 174648 allocs/op +BenchmarkTasks/Sleep10msW50K/1u-1Mt/BufferedPool-24 2 348099114 ns/op 2872745 ops/s 20447776 B/op 198210 allocs/op +BenchmarkTasks/Sleep10msW50K/1u-1Mt/Pond-24 2 2209884890 ns/op 452512 ops/s 359006680 B/op 8174338 allocs/op +BenchmarkTasks/Sleep10msW50K/100u-10Kt/VarMQ-24 2 387708320 ns/op 2579259 ops/s 129137432 B/op 1389339 allocs/op +BenchmarkTasks/Sleep10msW50K/100u-10Kt/Ants-24 2 485079833 ns/op 2061516 ops/s 11552860 B/op 145234 allocs/op +BenchmarkTasks/Sleep10msW50K/100u-10Kt/WorkerPool-24 2 973195121 ns/op 1027543 ops/s 2994120 B/op 41135 allocs/op +BenchmarkTasks/Sleep10msW50K/100u-10Kt/Conc-24 2 694553566 ns/op 1439774 ops/s 9579656 B/op 174420 allocs/op +BenchmarkTasks/Sleep10msW50K/100u-10Kt/ErrGroup-24 2 670162861 ns/op 1492175 ops/s 136196656 B/op 3001358 allocs/op +BenchmarkTasks/Sleep10msW50K/100u-10Kt/Gopool-24 2 787295233 ns/op 1270172 ops/s 80781036 B/op 1484838 allocs/op +BenchmarkTasks/Sleep10msW50K/100u-10Kt/GoroutinePool-24 2 620324118 ns/op 1612060 ops/s 9551352 B/op 174556 allocs/op +BenchmarkTasks/Sleep10msW50K/100u-10Kt/BufferedPool-24 2 320685138 ns/op 3118323 ops/s 20452408 B/op 197518 allocs/op +BenchmarkTasks/Sleep10msW50K/100u-10Kt/Pond-24 2 2566218036 ns/op 389679 ops/s 359397856 B/op 8177902 allocs/op +BenchmarkTasks/Sleep10msW50K/1Ku-1Kt/VarMQ-24 2 370966112 ns/op 2695664 ops/s 121533032 B/op 1388928 allocs/op +BenchmarkTasks/Sleep10msW50K/1Ku-1Kt/Ants-24 2 488037402 ns/op 2049023 ops/s 11667948 B/op 148015 allocs/op +BenchmarkTasks/Sleep10msW50K/1Ku-1Kt/WorkerPool-24 2 774847583 ns/op 1290576 ops/s 3064432 B/op 42625 allocs/op +BenchmarkTasks/Sleep10msW50K/1Ku-1Kt/Conc-24 2 990691923 ns/op 1009396 ops/s 9549368 B/op 175154 allocs/op +BenchmarkTasks/Sleep10msW50K/1Ku-1Kt/ErrGroup-24 2 618466645 ns/op 1616902 ops/s 136055776 B/op 3001167 allocs/op +BenchmarkTasks/Sleep10msW50K/1Ku-1Kt/Gopool-24 2 718951212 ns/op 1390915 ops/s 77748344 B/op 1489632 allocs/op +BenchmarkTasks/Sleep10msW50K/1Ku-1Kt/GoroutinePool-24 2 838907040 ns/op 1192027 ops/s 9762136 B/op 175829 allocs/op +BenchmarkTasks/Sleep10msW50K/1Ku-1Kt/BufferedPool-24 2 328081454 ns/op 3048024 ops/s 20398288 B/op 198627 allocs/op +BenchmarkTasks/Sleep10msW50K/1Ku-1Kt/Pond-24 2 2679271093 ns/op 373236 ops/s 348963144 B/op 8087311 allocs/op +BenchmarkTasks/Sleep10msW50K/10Ku-100t/VarMQ-24 2 379681174 ns/op 2633789 ops/s 124617536 B/op 1395024 allocs/op +BenchmarkTasks/Sleep10msW50K/10Ku-100t/Ants-24 2 526375190 ns/op 1899786 ops/s 15748284 B/op 204691 allocs/op +BenchmarkTasks/Sleep10msW50K/10Ku-100t/WorkerPool-24 2 827339852 ns/op 1208693 ops/s 3593304 B/op 53942 allocs/op +BenchmarkTasks/Sleep10msW50K/10Ku-100t/Conc-24 2 1535384326 ns/op 651303 ops/s 11656832 B/op 187868 allocs/op +BenchmarkTasks/Sleep10msW50K/10Ku-100t/ErrGroup-24 2 676492199 ns/op 1478214 ops/s 136969408 B/op 3015523 allocs/op +BenchmarkTasks/Sleep10msW50K/10Ku-100t/Gopool-24 2 815328138 ns/op 1226500 ops/s 40331248 B/op 702353 allocs/op +BenchmarkTasks/Sleep10msW50K/10Ku-100t/GoroutinePool-24 2 605252522 ns/op 1652203 ops/s 9967024 B/op 184496 allocs/op +BenchmarkTasks/Sleep10msW50K/10Ku-100t/BufferedPool-24 2 342537614 ns/op 2919387 ops/s 21031672 B/op 209327 allocs/op +BenchmarkTasks/Sleep10msW50K/10Ku-100t/Pond-24 2 2104242226 ns/op 475230 ops/s 342140216 B/op 7869442 allocs/op +BenchmarkTasks/Sleep10msW50K/1Mu-1t/VarMQ-24 2 412147224 ns/op 2426317 ops/s 158666940 B/op 2387723 allocs/op +BenchmarkTasks/Sleep10msW50K/1Mu-1t/Ants-24 2 700033584 ns/op 1428503 ops/s 45542156 B/op 1168909 allocs/op +BenchmarkTasks/Sleep10msW50K/1Mu-1t/WorkerPool-24 2 1094361996 ns/op 913774 ops/s 299748296 B/op 1909105 allocs/op +BenchmarkTasks/Sleep10msW50K/1Mu-1t/Conc-24 2 753348196 ns/op 1327407 ops/s 41489608 B/op 1174020 allocs/op +BenchmarkTasks/Sleep10msW50K/1Mu-1t/ErrGroup-24 2 505188540 ns/op 1979459 ops/s 168000264 B/op 4000008 allocs/op +BenchmarkTasks/Sleep10msW50K/1Mu-1t/Gopool-24 2 965537114 ns/op 1035693 ops/s 76360568 B/op 1612011 allocs/op +BenchmarkTasks/Sleep10msW50K/1Mu-1t/GoroutinePool-24 2 710382874 ns/op 1407692 ops/s 41530336 B/op 1174384 allocs/op +BenchmarkTasks/Sleep10msW50K/1Mu-1t/BufferedPool-24 2 698327344 ns/op 1431993 ops/s 49506256 B/op 1174138 allocs/op +BenchmarkTasks/Sleep10msW50K/1Mu-1t/Pond-24 2 2153440694 ns/op 464373 ops/s 356648496 B/op 7459686 allocs/op +BenchmarkTasks/Loop10W50K/1u-1Mt/VarMQ-24 2 142512716 ns/op 7016918 ops/s 86216404 B/op 1003786 allocs/op +BenchmarkTasks/Loop10W50K/1u-1Mt/Ants-24 2 533023076 ns/op 1876091 ops/s 570284 B/op 7786 allocs/op +BenchmarkTasks/Loop10W50K/1u-1Mt/WorkerPool-24 2 569206277 ns/op 1756832 ops/s 1160 B/op 23 allocs/op +BenchmarkTasks/Loop10W50K/1u-1Mt/Conc-24 2 669568399 ns/op 1493499 ops/s 4701344 B/op 124125 allocs/op +BenchmarkTasks/Loop10W50K/1u-1Mt/ErrGroup-24 2 407298184 ns/op 2455204 ops/s 40000296 B/op 2000009 allocs/op +BenchmarkTasks/Loop10W50K/1u-1Mt/Gopool-24 2 1004968672 ns/op 995056 ops/s 16412720 B/op 986273 allocs/op +BenchmarkTasks/Loop10W50K/1u-1Mt/GoroutinePool-24 2 621145176 ns/op 1609930 ops/s 4736136 B/op 124436 allocs/op +BenchmarkTasks/Loop10W50K/1u-1Mt/BufferedPool-24 2 740173040 ns/op 1351035 ops/s 12707744 B/op 124152 allocs/op +BenchmarkTasks/Loop10W50K/1u-1Mt/Pond-24 2 2030607502 ns/op 492463 ops/s 240589312 B/op 7001744 allocs/op +BenchmarkTasks/Loop10W50K/100u-10Kt/VarMQ-24 2 83159260 ns/op 12025119 ops/s 86710948 B/op 1007228 allocs/op +BenchmarkTasks/Loop10W50K/100u-10Kt/Ants-24 2 405626780 ns/op 2465320 ops/s 151504 B/op 2162 allocs/op +BenchmarkTasks/Loop10W50K/100u-10Kt/WorkerPool-24 2 686340595 ns/op 1457003 ops/s 7528 B/op 222 allocs/op +BenchmarkTasks/Loop10W50K/100u-10Kt/Conc-24 2 625195270 ns/op 1599500 ops/s 4751328 B/op 124642 allocs/op +BenchmarkTasks/Loop10W50K/100u-10Kt/ErrGroup-24 2 594844796 ns/op 1681111 ops/s 40003464 B/op 2000108 allocs/op +BenchmarkTasks/Loop10W50K/100u-10Kt/Gopool-24 2 504388818 ns/op 1982597 ops/s 9265836 B/op 501947 allocs/op +BenchmarkTasks/Loop10W50K/100u-10Kt/GoroutinePool-24 2 732772260 ns/op 1364680 ops/s 4737120 B/op 124516 allocs/op +BenchmarkTasks/Loop10W50K/100u-10Kt/BufferedPool-24 2 428241499 ns/op 2335131 ops/s 12700048 B/op 124154 allocs/op +BenchmarkTasks/Loop10W50K/100u-10Kt/Pond-24 2 1792599073 ns/op 557849 ops/s 241359848 B/op 7004343 allocs/op +BenchmarkTasks/Loop10W50K/1Ku-1Kt/VarMQ-24 2 84040490 ns/op 11899026 ops/s 86823692 B/op 1009181 allocs/op +BenchmarkTasks/Loop10W50K/1Ku-1Kt/Ants-24 2 407756620 ns/op 2452443 ops/s 658044 B/op 10271 allocs/op +BenchmarkTasks/Loop10W50K/1Ku-1Kt/WorkerPool-24 2 628171067 ns/op 1591923 ops/s 74304 B/op 1612 allocs/op +BenchmarkTasks/Loop10W50K/1Ku-1Kt/Conc-24 2 795640121 ns/op 1256850 ops/s 4799504 B/op 125715 allocs/op +BenchmarkTasks/Loop10W50K/1Ku-1Kt/ErrGroup-24 2 470054190 ns/op 2127414 ops/s 40040608 B/op 2001082 allocs/op +BenchmarkTasks/Loop10W50K/1Ku-1Kt/Gopool-24 2 429229336 ns/op 2329757 ops/s 2366336 B/op 111142 allocs/op +BenchmarkTasks/Loop10W50K/1Ku-1Kt/GoroutinePool-24 2 669925654 ns/op 1492703 ops/s 4800528 B/op 125725 allocs/op +BenchmarkTasks/Loop10W50K/1Ku-1Kt/BufferedPool-24 2 505505988 ns/op 1978216 ops/s 12739376 B/op 125148 allocs/op +BenchmarkTasks/Loop10W50K/1Ku-1Kt/Pond-24 2 2571329362 ns/op 388904 ops/s 244871056 B/op 7013127 allocs/op +BenchmarkTasks/Loop10W50K/10Ku-100t/VarMQ-24 2 94503664 ns/op 10581600 ops/s 87186212 B/op 1018640 allocs/op +BenchmarkTasks/Loop10W50K/10Ku-100t/Ants-24 2 437789862 ns/op 2284201 ops/s 5501680 B/op 77939 allocs/op +BenchmarkTasks/Loop10W50K/10Ku-100t/WorkerPool-24 2 635483914 ns/op 1573604 ops/s 905320 B/op 15968 allocs/op +BenchmarkTasks/Loop10W50K/10Ku-100t/Conc-24 2 695963406 ns/op 1436857 ops/s 5289384 B/op 136518 allocs/op +BenchmarkTasks/Loop10W50K/10Ku-100t/ErrGroup-24 2 470293384 ns/op 2126332 ops/s 40339192 B/op 2010177 allocs/op +BenchmarkTasks/Loop10W50K/10Ku-100t/Gopool-24 2 370038436 ns/op 2702422 ops/s 2341680 B/op 70566 allocs/op +BenchmarkTasks/Loop10W50K/10Ku-100t/GoroutinePool-24 2 545247414 ns/op 1834030 ops/s 5338120 B/op 136953 allocs/op +BenchmarkTasks/Loop10W50K/10Ku-100t/BufferedPool-24 2 732241752 ns/op 1365669 ops/s 13025024 B/op 134127 allocs/op +BenchmarkTasks/Loop10W50K/10Ku-100t/Pond-24 2 2032175656 ns/op 492083 ops/s 248282504 B/op 6834213 allocs/op +BenchmarkTasks/Loop10W50K/1Mu-1t/VarMQ-24 2 189557224 ns/op 5275452 ops/s 120813892 B/op 2011114 allocs/op +BenchmarkTasks/Loop10W50K/1Mu-1t/Ants-24 2 488996772 ns/op 2045003 ops/s 33851236 B/op 1025994 allocs/op +BenchmarkTasks/Loop10W50K/1Mu-1t/WorkerPool-24 2 1045743800 ns/op 956257 ops/s 92838600 B/op 1466493 allocs/op +BenchmarkTasks/Loop10W50K/1Mu-1t/Conc-24 2 672910756 ns/op 1486081 ops/s 36684624 B/op 1123975 allocs/op +BenchmarkTasks/Loop10W50K/1Mu-1t/ErrGroup-24 2 418826257 ns/op 2387625 ops/s 72000264 B/op 3000008 allocs/op +BenchmarkTasks/Loop10W50K/1Mu-1t/Gopool-24 2 508175413 ns/op 1967824 ops/s 36276784 B/op 1259351 allocs/op +BenchmarkTasks/Loop10W50K/1Mu-1t/GoroutinePool-24 2 541293053 ns/op 1847428 ops/s 36726976 B/op 1124354 allocs/op +BenchmarkTasks/Loop10W50K/1Mu-1t/BufferedPool-24 2 548528616 ns/op 1823059 ops/s 44699480 B/op 1124077 allocs/op +BenchmarkTasks/Loop10W50K/1Mu-1t/Pond-24 2 2643086406 ns/op 378346 ops/s 327906968 B/op 7663535 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1u-1Mt/VarMQ-24 2 263442931 ns/op 3795889 ops/s 111337884 B/op 1291789 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1u-1Mt/Ants-24 2 702979964 ns/op 1422516 ops/s 11891752 B/op 148120 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1u-1Mt/WorkerPool-24 2 1430757198 ns/op 698931 ops/s 1265264 B/op 17699 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1u-1Mt/Conc-24 2 681888820 ns/op 1466515 ops/s 9524304 B/op 174330 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1u-1Mt/ErrGroup-24 2 396760831 ns/op 2520410 ops/s 136123176 B/op 3000010 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1u-1Mt/Gopool-24 2 682318318 ns/op 1465592 ops/s 82773500 B/op 1678765 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1u-1Mt/GoroutinePool-24 2 617436029 ns/op 1619601 ops/s 9542464 B/op 174493 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1u-1Mt/BufferedPool-24 2 579868406 ns/op 1724529 ops/s 17511328 B/op 174184 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1u-1Mt/Pond-24 2 2634725318 ns/op 379546 ops/s 338792984 B/op 8009332 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/100u-10Kt/VarMQ-24 2 239930380 ns/op 4167876 ops/s 113545204 B/op 1292676 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/100u-10Kt/Ants-24 2 452659294 ns/op 2209167 ops/s 5764720 B/op 74594 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/100u-10Kt/WorkerPool-24 2 971476458 ns/op 1029361 ops/s 1536880 B/op 21280 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/100u-10Kt/Conc-24 2 645260262 ns/op 1549762 ops/s 9535816 B/op 174504 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/100u-10Kt/ErrGroup-24 2 573158740 ns/op 1744717 ops/s 136003464 B/op 3000108 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/100u-10Kt/Gopool-24 2 727265774 ns/op 1375013 ops/s 73282924 B/op 1473737 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/100u-10Kt/GoroutinePool-24 2 716163820 ns/op 1396329 ops/s 9546976 B/op 174604 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/100u-10Kt/BufferedPool-24 2 314908889 ns/op 3175522 ops/s 17523512 B/op 174363 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/100u-10Kt/Pond-24 2 2684712335 ns/op 372479 ops/s 338836976 B/op 8009796 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Ku-1Kt/VarMQ-24 2 248063075 ns/op 4031233 ops/s 113412836 B/op 1289388 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Ku-1Kt/Ants-24 2 454045932 ns/op 2202420 ops/s 6599132 B/op 83543 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Ku-1Kt/WorkerPool-24 2 793243270 ns/op 1260647 ops/s 1530760 B/op 21708 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Ku-1Kt/Conc-24 2 863981114 ns/op 1157433 ops/s 9534880 B/op 175138 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Ku-1Kt/ErrGroup-24 2 614621856 ns/op 1627017 ops/s 136046320 B/op 3001133 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Ku-1Kt/Gopool-24 2 747838443 ns/op 1337187 ops/s 72251108 B/op 1472141 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Ku-1Kt/GoroutinePool-24 2 729250620 ns/op 1371271 ops/s 9551024 B/op 175283 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Ku-1Kt/BufferedPool-24 2 318936316 ns/op 3135422 ops/s 17615168 B/op 175203 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Ku-1Kt/Pond-24 2 2714894914 ns/op 368338 ops/s 338701528 B/op 8009229 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/10Ku-100t/VarMQ-24 2 249743526 ns/op 4004108 ops/s 113880260 B/op 1300865 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/10Ku-100t/Ants-24 2 512002807 ns/op 1953114 ops/s 11954896 B/op 157336 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/10Ku-100t/WorkerPool-24 2 857120464 ns/op 1166697 ops/s 2452512 B/op 37287 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/10Ku-100t/Conc-24 2 1675141156 ns/op 596965 ops/s 9810224 B/op 184025 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/10Ku-100t/ErrGroup-24 2 798847054 ns/op 1251804 ops/s 136741888 B/op 3013772 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/10Ku-100t/Gopool-24 2 768883918 ns/op 1300586 ops/s 74421860 B/op 1506132 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/10Ku-100t/GoroutinePool-24 2 775868922 ns/op 1288878 ops/s 9837176 B/op 184266 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/10Ku-100t/BufferedPool-24 2 331854528 ns/op 3013369 ops/s 17888016 B/op 184214 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/10Ku-100t/Pond-24 2 2041574194 ns/op 489818 ops/s 343015256 B/op 8004368 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Mu-1t/VarMQ-24 2 334143034 ns/op 2992730 ops/s 144837028 B/op 2245461 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Mu-1t/Ants-24 2 681483849 ns/op 1467386 ops/s 39249332 B/op 1092279 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Mu-1t/WorkerPool-24 2 1027958976 ns/op 972801 ops/s 83620144 B/op 1472545 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Mu-1t/Conc-24 2 733335270 ns/op 1363633 ops/s 41495152 B/op 1174069 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Mu-1t/ErrGroup-24 2 525375220 ns/op 1903402 ops/s 168000264 B/op 4000008 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Mu-1t/Gopool-24 2 926237349 ns/op 1079637 ops/s 77511292 B/op 1625750 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Mu-1t/GoroutinePool-24 2 675623410 ns/op 1480114 ops/s 41536104 B/op 1174435 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Mu-1t/BufferedPool-24 2 678752878 ns/op 1473290 ops/s 49510064 B/op 1174172 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Mu-1t/Pond-24 2 2006388494 ns/op 498408 ops/s 370800064 B/op 7590802 allocs/op +BenchmarkTasks/Sleep10msW100K/1u-1Mt/VarMQ-24 2 309998836 ns/op 3225819 ops/s 120686548 B/op 1467918 allocs/op +BenchmarkTasks/Sleep10msW100K/1u-1Mt/Ants-24 2 718016591 ns/op 1392725 ops/s 19838012 B/op 252377 allocs/op +BenchmarkTasks/Sleep10msW100K/1u-1Mt/WorkerPool-24 2 1452201447 ns/op 688610 ops/s 2618744 B/op 36007 allocs/op +BenchmarkTasks/Sleep10msW100K/1u-1Mt/Conc-24 2 713088348 ns/op 1402351 ops/s 19109912 B/op 349202 allocs/op +BenchmarkTasks/Sleep10msW100K/1u-1Mt/ErrGroup-24 2 456471156 ns/op 2190719 ops/s 136000296 B/op 3000009 allocs/op +BenchmarkTasks/Sleep10msW100K/1u-1Mt/Gopool-24 2 753472956 ns/op 1327188 ops/s 82964032 B/op 1680751 allocs/op +BenchmarkTasks/Sleep10msW100K/1u-1Mt/GoroutinePool-24 2 662811120 ns/op 1508725 ops/s 19153160 B/op 349588 allocs/op +BenchmarkTasks/Sleep10msW100K/1u-1Mt/BufferedPool-24 2 654565471 ns/op 1527731 ops/s 27116928 B/op 349234 allocs/op +BenchmarkTasks/Sleep10msW100K/1u-1Mt/Pond-24 2 2354647134 ns/op 424692 ops/s 341203984 B/op 8015386 allocs/op +BenchmarkTasks/Sleep10msW100K/100u-10Kt/VarMQ-24 2 315414502 ns/op 3170431 ops/s 123930692 B/op 1452466 allocs/op +BenchmarkTasks/Sleep10msW100K/100u-10Kt/Ants-24 2 475349776 ns/op 2103714 ops/s 10991268 B/op 137187 allocs/op +BenchmarkTasks/Sleep10msW100K/100u-10Kt/WorkerPool-24 2 1058188722 ns/op 945011 ops/s 2730816 B/op 37473 allocs/op +BenchmarkTasks/Sleep10msW100K/100u-10Kt/Conc-24 2 1077232098 ns/op 928305 ops/s 19151720 B/op 349646 allocs/op +BenchmarkTasks/Sleep10msW100K/100u-10Kt/ErrGroup-24 2 544508316 ns/op 1836519 ops/s 136075560 B/op 3000130 allocs/op +BenchmarkTasks/Sleep10msW100K/100u-10Kt/Gopool-24 2 732950968 ns/op 1364348 ops/s 75305988 B/op 1504427 allocs/op +BenchmarkTasks/Sleep10msW100K/100u-10Kt/GoroutinePool-24 2 729665773 ns/op 1370490 ops/s 19148656 B/op 349619 allocs/op +BenchmarkTasks/Sleep10msW100K/100u-10Kt/BufferedPool-24 2 602655266 ns/op 1659323 ops/s 27103016 B/op 349180 allocs/op +BenchmarkTasks/Sleep10msW100K/100u-10Kt/Pond-24 2 2246318596 ns/op 445173 ops/s 341360872 B/op 8016857 allocs/op +BenchmarkTasks/Sleep10msW100K/1Ku-1Kt/VarMQ-24 2 320666119 ns/op 3118508 ops/s 124175236 B/op 1454293 allocs/op +BenchmarkTasks/Sleep10msW100K/1Ku-1Kt/Ants-24 2 477120906 ns/op 2095905 ops/s 11326392 B/op 141943 allocs/op +BenchmarkTasks/Sleep10msW100K/1Ku-1Kt/WorkerPool-24 2 791269591 ns/op 1263792 ops/s 3231448 B/op 44541 allocs/op +BenchmarkTasks/Sleep10msW100K/1Ku-1Kt/Conc-24 2 1030392180 ns/op 970504 ops/s 19135160 B/op 350141 allocs/op +BenchmarkTasks/Sleep10msW100K/1Ku-1Kt/ErrGroup-24 2 688398844 ns/op 1452646 ops/s 136045256 B/op 3001124 allocs/op +BenchmarkTasks/Sleep10msW100K/1Ku-1Kt/Gopool-24 2 726869690 ns/op 1375762 ops/s 73081144 B/op 1481231 allocs/op +BenchmarkTasks/Sleep10msW100K/1Ku-1Kt/GoroutinePool-24 2 630448946 ns/op 1586171 ops/s 19140496 B/op 350189 allocs/op +BenchmarkTasks/Sleep10msW100K/1Ku-1Kt/BufferedPool-24 2 568508386 ns/op 1758989 ops/s 27223792 B/op 350280 allocs/op +BenchmarkTasks/Sleep10msW100K/1Ku-1Kt/Pond-24 2 2437599830 ns/op 410240 ops/s 341084584 B/op 8015033 allocs/op +BenchmarkTasks/Sleep10msW100K/10Ku-100t/VarMQ-24 2 340169122 ns/op 2939714 ops/s 123695964 B/op 1454141 allocs/op +BenchmarkTasks/Sleep10msW100K/10Ku-100t/Ants-24 2 533045608 ns/op 1876012 ops/s 15806604 B/op 205375 allocs/op +BenchmarkTasks/Sleep10msW100K/10Ku-100t/WorkerPool-24 2 858272548 ns/op 1165131 ops/s 3281616 B/op 49620 allocs/op +BenchmarkTasks/Sleep10msW100K/10Ku-100t/Conc-24 2 1118762502 ns/op 893845 ops/s 19425600 B/op 359160 allocs/op +BenchmarkTasks/Sleep10msW100K/10Ku-100t/ErrGroup-24 2 634071585 ns/op 1577109 ops/s 136735504 B/op 3013715 allocs/op +BenchmarkTasks/Sleep10msW100K/10Ku-100t/Gopool-24 2 766404758 ns/op 1304794 ops/s 76851780 B/op 1539246 allocs/op +BenchmarkTasks/Sleep10msW100K/10Ku-100t/GoroutinePool-24 2 723579114 ns/op 1382019 ops/s 19423120 B/op 359141 allocs/op +BenchmarkTasks/Sleep10msW100K/10Ku-100t/BufferedPool-24 2 488424362 ns/op 2047400 ops/s 27499472 B/op 359170 allocs/op +BenchmarkTasks/Sleep10msW100K/10Ku-100t/Pond-24 2 2049967228 ns/op 487813 ops/s 347344448 B/op 8046405 allocs/op +BenchmarkTasks/Sleep10msW100K/1Mu-1t/VarMQ-24 2 390238309 ns/op 2562537 ops/s 154562924 B/op 2387663 allocs/op +BenchmarkTasks/Sleep10msW100K/1Mu-1t/Ants-24 2 768985116 ns/op 1300415 ops/s 43166080 B/op 1140013 allocs/op +BenchmarkTasks/Sleep10msW100K/1Mu-1t/WorkerPool-24 2 1021747314 ns/op 978716 ops/s 83813520 B/op 1481445 allocs/op +BenchmarkTasks/Sleep10msW100K/1Mu-1t/Conc-24 2 794962660 ns/op 1257921 ops/s 51126344 B/op 1349348 allocs/op +BenchmarkTasks/Sleep10msW100K/1Mu-1t/ErrGroup-24 2 616289850 ns/op 1622613 ops/s 168000264 B/op 4000008 allocs/op +BenchmarkTasks/Sleep10msW100K/1Mu-1t/Gopool-24 2 997275444 ns/op 1002732 ops/s 91335184 B/op 1808682 allocs/op +BenchmarkTasks/Sleep10msW100K/1Mu-1t/GoroutinePool-24 2 736176256 ns/op 1358370 ops/s 51106816 B/op 1349174 allocs/op +BenchmarkTasks/Sleep10msW100K/1Mu-1t/BufferedPool-24 2 768567502 ns/op 1301122 ops/s 59106480 B/op 1349140 allocs/op +BenchmarkTasks/Sleep10msW100K/1Mu-1t/Pond-24 2 2369732567 ns/op 421989 ops/s 380618776 B/op 7833077 allocs/op +BenchmarkTasks/Loop10W100K/1u-1Mt/VarMQ-24 2 130955160 ns/op 7636202 ops/s 86136676 B/op 1003321 allocs/op +BenchmarkTasks/Loop10W100K/1u-1Mt/Ants-24 2 521975251 ns/op 1915800 ops/s 853220 B/op 11492 allocs/op +BenchmarkTasks/Loop10W100K/1u-1Mt/WorkerPool-24 2 625424521 ns/op 1598914 ops/s 1144 B/op 22 allocs/op +BenchmarkTasks/Loop10W100K/1u-1Mt/Conc-24 2 814699271 ns/op 1227447 ops/s 9512376 B/op 249224 allocs/op +BenchmarkTasks/Loop10W100K/1u-1Mt/ErrGroup-24 2 430268728 ns/op 2324129 ops/s 40000296 B/op 2000009 allocs/op +BenchmarkTasks/Loop10W100K/1u-1Mt/Gopool-24 2 945536832 ns/op 1057600 ops/s 16812944 B/op 986909 allocs/op +BenchmarkTasks/Loop10W100K/1u-1Mt/GoroutinePool-24 2 906726508 ns/op 1102868 ops/s 9533616 B/op 249414 allocs/op +BenchmarkTasks/Loop10W100K/1u-1Mt/BufferedPool-24 2 719739842 ns/op 1389391 ops/s 17507240 B/op 249147 allocs/op +BenchmarkTasks/Loop10W100K/1u-1Mt/Pond-24 2 2314256135 ns/op 432104 ops/s 240485856 B/op 7001303 allocs/op +BenchmarkTasks/Loop10W100K/100u-10Kt/VarMQ-24 2 84177449 ns/op 11879666 ops/s 86645524 B/op 1007113 allocs/op +BenchmarkTasks/Loop10W100K/100u-10Kt/Ants-24 2 405734682 ns/op 2464665 ops/s 128788 B/op 1872 allocs/op +BenchmarkTasks/Loop10W100K/100u-10Kt/WorkerPool-24 2 847517736 ns/op 1179916 ops/s 7560 B/op 223 allocs/op +BenchmarkTasks/Loop10W100K/100u-10Kt/Conc-24 2 598181617 ns/op 1671733 ops/s 9536208 B/op 249507 allocs/op +BenchmarkTasks/Loop10W100K/100u-10Kt/ErrGroup-24 2 401436111 ns/op 2491056 ops/s 40003464 B/op 2000108 allocs/op +BenchmarkTasks/Loop10W100K/100u-10Kt/Gopool-24 2 531713661 ns/op 1880712 ops/s 8723688 B/op 478610 allocs/op +BenchmarkTasks/Loop10W100K/100u-10Kt/GoroutinePool-24 2 818575064 ns/op 1221635 ops/s 9535160 B/op 249498 allocs/op +BenchmarkTasks/Loop10W100K/100u-10Kt/BufferedPool-24 2 783990893 ns/op 1275525 ops/s 17509008 B/op 249234 allocs/op +BenchmarkTasks/Loop10W100K/100u-10Kt/Pond-24 2 2053994181 ns/op 486856 ops/s 241273440 B/op 7003572 allocs/op +BenchmarkTasks/Loop10W100K/1Ku-1Kt/VarMQ-24 2 83374054 ns/op 11994139 ops/s 86860252 B/op 1009821 allocs/op +BenchmarkTasks/Loop10W100K/1Ku-1Kt/Ants-24 2 408114029 ns/op 2450296 ops/s 681820 B/op 10641 allocs/op +BenchmarkTasks/Loop10W100K/1Ku-1Kt/WorkerPool-24 2 601406041 ns/op 1662770 ops/s 72752 B/op 1589 allocs/op +BenchmarkTasks/Loop10W100K/1Ku-1Kt/Conc-24 2 731061043 ns/op 1367875 ops/s 9558008 B/op 250345 allocs/op +BenchmarkTasks/Loop10W100K/1Ku-1Kt/ErrGroup-24 2 621221512 ns/op 1609732 ops/s 40055952 B/op 2001219 allocs/op +BenchmarkTasks/Loop10W100K/1Ku-1Kt/Gopool-24 2 401798427 ns/op 2488810 ops/s 2648200 B/op 116686 allocs/op +BenchmarkTasks/Loop10W100K/1Ku-1Kt/GoroutinePool-24 2 830510698 ns/op 1204078 ops/s 9584064 B/op 250578 allocs/op +BenchmarkTasks/Loop10W100K/1Ku-1Kt/BufferedPool-24 2 699314360 ns/op 1429972 ops/s 17535680 B/op 250115 allocs/op +BenchmarkTasks/Loop10W100K/1Ku-1Kt/Pond-24 2 2658391364 ns/op 376167 ops/s 245483472 B/op 7018595 allocs/op +BenchmarkTasks/Loop10W100K/10Ku-100t/VarMQ-24 2 93115086 ns/op 10739398 ops/s 87113908 B/op 1018335 allocs/op +BenchmarkTasks/Loop10W100K/10Ku-100t/Ants-24 2 440816402 ns/op 2268518 ops/s 5880500 B/op 83513 allocs/op +BenchmarkTasks/Loop10W100K/10Ku-100t/WorkerPool-24 2 586958707 ns/op 1703697 ops/s 853384 B/op 15327 allocs/op +BenchmarkTasks/Loop10W100K/10Ku-100t/Conc-24 2 734882341 ns/op 1360762 ops/s 9970048 B/op 260452 allocs/op +BenchmarkTasks/Loop10W100K/10Ku-100t/ErrGroup-24 2 476636564 ns/op 2098035 ops/s 40340144 B/op 2010185 allocs/op +BenchmarkTasks/Loop10W100K/10Ku-100t/Gopool-24 2 320329244 ns/op 3121788 ops/s 2551192 B/op 61673 allocs/op +BenchmarkTasks/Loop10W100K/10Ku-100t/GoroutinePool-24 2 691617018 ns/op 1445887 ops/s 10086152 B/op 261489 allocs/op +BenchmarkTasks/Loop10W100K/10Ku-100t/BufferedPool-24 2 629753526 ns/op 1587923 ops/s 17827152 B/op 259146 allocs/op +BenchmarkTasks/Loop10W100K/10Ku-100t/Pond-24 2 2431352086 ns/op 411294 ops/s 259818112 B/op 7062098 allocs/op +BenchmarkTasks/Loop10W100K/1Mu-1t/VarMQ-24 2 193220834 ns/op 5175425 ops/s 120377644 B/op 2011023 allocs/op +BenchmarkTasks/Loop10W100K/1Mu-1t/Ants-24 2 483094930 ns/op 2069987 ops/s 33576652 B/op 1022178 allocs/op +BenchmarkTasks/Loop10W100K/1Mu-1t/WorkerPool-24 2 1028337092 ns/op 972444 ops/s 79927032 B/op 1428069 allocs/op +BenchmarkTasks/Loop10W100K/1Mu-1t/Conc-24 2 711681915 ns/op 1405122 ops/s 41487312 B/op 1248999 allocs/op +BenchmarkTasks/Loop10W100K/1Mu-1t/ErrGroup-24 2 343701294 ns/op 2909503 ops/s 72000264 B/op 3000008 allocs/op +BenchmarkTasks/Loop10W100K/1Mu-1t/Gopool-24 2 552314450 ns/op 1810563 ops/s 36485028 B/op 1260538 allocs/op +BenchmarkTasks/Loop10W100K/1Mu-1t/GoroutinePool-24 2 569076709 ns/op 1757232 ops/s 41541480 B/op 1249483 allocs/op +BenchmarkTasks/Loop10W100K/1Mu-1t/BufferedPool-24 2 580390525 ns/op 1722978 ops/s 49493936 B/op 1249028 allocs/op +BenchmarkTasks/Loop10W100K/1Mu-1t/Pond-24 2 3354968138 ns/op 298065 ops/s 347443368 B/op 8191251 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1u-1Mt/VarMQ-24 2 285614812 ns/op 3501219 ops/s 108347364 B/op 1293970 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1u-1Mt/Ants-24 2 616715938 ns/op 1621492 ops/s 11905556 B/op 149941 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1u-1Mt/WorkerPool-24 2 1450247862 ns/op 689537 ops/s 1376064 B/op 19071 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1u-1Mt/Conc-24 2 725902948 ns/op 1377595 ops/s 19118088 B/op 349275 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1u-1Mt/ErrGroup-24 2 404606098 ns/op 2471540 ops/s 136000296 B/op 3000009 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1u-1Mt/Gopool-24 2 685861864 ns/op 1458020 ops/s 82775868 B/op 1674193 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1u-1Mt/GoroutinePool-24 2 814838970 ns/op 1227236 ops/s 19153048 B/op 349587 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1u-1Mt/BufferedPool-24 2 653238664 ns/op 1530834 ops/s 27113568 B/op 349204 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1u-1Mt/Pond-24 2 2483100032 ns/op 402722 ops/s 338790576 B/op 8009311 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/100u-10Kt/VarMQ-24 2 231098444 ns/op 4327160 ops/s 117869324 B/op 1350465 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/100u-10Kt/Ants-24 2 450668342 ns/op 2218927 ops/s 5849012 B/op 75954 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/100u-10Kt/WorkerPool-24 2 946327130 ns/op 1056717 ops/s 1469944 B/op 20289 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/100u-10Kt/Conc-24 2 698627438 ns/op 1431378 ops/s 19116440 B/op 349331 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/100u-10Kt/ErrGroup-24 2 587102282 ns/op 1703281 ops/s 136003464 B/op 3000108 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/100u-10Kt/Gopool-24 2 705621273 ns/op 1417191 ops/s 71605484 B/op 1446989 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/100u-10Kt/GoroutinePool-24 2 706895130 ns/op 1414637 ops/s 19144120 B/op 349578 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/100u-10Kt/BufferedPool-24 2 475920937 ns/op 2101189 ops/s 27106152 B/op 349208 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/100u-10Kt/Pond-24 2 2511302358 ns/op 398200 ops/s 338515424 B/op 8006925 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Ku-1Kt/VarMQ-24 2 240952796 ns/op 4150190 ops/s 117622820 B/op 1350678 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Ku-1Kt/Ants-24 2 458205006 ns/op 2182429 ops/s 6544928 B/op 82390 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Ku-1Kt/WorkerPool-24 2 778143200 ns/op 1285111 ops/s 1673208 B/op 23654 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Ku-1Kt/Conc-24 2 744102123 ns/op 1343902 ops/s 19174136 B/op 350489 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Ku-1Kt/ErrGroup-24 2 557365255 ns/op 1794156 ops/s 136043464 B/op 3001108 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Ku-1Kt/Gopool-24 2 722834164 ns/op 1383443 ops/s 72734836 B/op 1481150 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Ku-1Kt/GoroutinePool-24 2 693175848 ns/op 1442635 ops/s 19159256 B/op 350356 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Ku-1Kt/BufferedPool-24 2 502190936 ns/op 1991274 ops/s 27139544 B/op 350149 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Ku-1Kt/Pond-24 2 2065663472 ns/op 484106 ops/s 338307680 B/op 8005713 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/10Ku-100t/VarMQ-24 2 236402642 ns/op 4230071 ops/s 118329244 B/op 1357916 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/10Ku-100t/Ants-24 2 524698328 ns/op 1905857 ops/s 11952288 B/op 155788 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/10Ku-100t/WorkerPool-24 2 855980334 ns/op 1168251 ops/s 2373912 B/op 35933 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/10Ku-100t/Conc-24 2 1514262420 ns/op 660388 ops/s 19407272 B/op 358993 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/10Ku-100t/ErrGroup-24 2 658370140 ns/op 1518902 ops/s 136714560 B/op 3013528 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/10Ku-100t/Gopool-24 2 717748712 ns/op 1393245 ops/s 74917540 B/op 1514743 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/10Ku-100t/GoroutinePool-24 2 650404317 ns/op 1537505 ops/s 19423288 B/op 359142 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/10Ku-100t/BufferedPool-24 2 451825721 ns/op 2213243 ops/s 27432080 B/op 359190 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/10Ku-100t/Pond-24 2 2038863196 ns/op 490469 ops/s 346072648 B/op 8046168 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Mu-1t/VarMQ-24 2 332506165 ns/op 3007463 ops/s 144270020 B/op 2251452 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Mu-1t/Ants-24 2 719057564 ns/op 1390709 ops/s 39099552 B/op 1090108 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Mu-1t/WorkerPool-24 2 1016983817 ns/op 983300 ops/s 81945720 B/op 1455518 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Mu-1t/Conc-24 2 790295800 ns/op 1265349 ops/s 51130824 B/op 1349388 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Mu-1t/ErrGroup-24 2 688285904 ns/op 1452885 ops/s 168000264 B/op 4000008 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Mu-1t/Gopool-24 2 946084611 ns/op 1056988 ops/s 91877272 B/op 1814438 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Mu-1t/GoroutinePool-24 2 714901652 ns/op 1398794 ops/s 51103232 B/op 1349142 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Mu-1t/BufferedPool-24 2 730442876 ns/op 1369032 ops/s 59103568 B/op 1349114 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Mu-1t/Pond-24 2 2098008646 ns/op 476642 ops/s 376017704 B/op 7857066 allocs/op +BenchmarkTasks/Sleep10msW300K/1u-1Mt/VarMQ-24 2 456591893 ns/op 2190140 ops/s 110242116 B/op 1357806 allocs/op +BenchmarkTasks/Sleep10msW300K/1u-1Mt/Ants-24 2 733380058 ns/op 1363549 ops/s 19788292 B/op 251060 allocs/op +BenchmarkTasks/Sleep10msW300K/1u-1Mt/WorkerPool-24 2 1442893477 ns/op 693052 ops/s 2632688 B/op 36233 allocs/op +BenchmarkTasks/Sleep10msW300K/1u-1Mt/Conc-24 2 940532026 ns/op 1063228 ops/s 57600208 B/op 1049387 allocs/op +BenchmarkTasks/Sleep10msW300K/1u-1Mt/ErrGroup-24 2 422462616 ns/op 2367073 ops/s 136180520 B/op 3000010 allocs/op +BenchmarkTasks/Sleep10msW300K/1u-1Mt/Gopool-24 2 709009176 ns/op 1410419 ops/s 83288492 B/op 1685491 allocs/op +BenchmarkTasks/Sleep10msW300K/1u-1Mt/GoroutinePool-24 2 764580694 ns/op 1307906 ops/s 57546328 B/op 1049527 allocs/op +BenchmarkTasks/Sleep10msW300K/1u-1Mt/BufferedPool-24 2 764597576 ns/op 1307878 ops/s 65504664 B/op 1049124 allocs/op +BenchmarkTasks/Sleep10msW300K/1u-1Mt/Pond-24 2 2225195518 ns/op 449399 ops/s 341124408 B/op 8014675 allocs/op +BenchmarkTasks/Sleep10msW300K/100u-10Kt/VarMQ-24 2 388763206 ns/op 2572260 ops/s 116146172 B/op 1415487 allocs/op +BenchmarkTasks/Sleep10msW300K/100u-10Kt/Ants-24 2 476330736 ns/op 2099382 ops/s 10966144 B/op 136626 allocs/op +BenchmarkTasks/Sleep10msW300K/100u-10Kt/WorkerPool-24 2 835960555 ns/op 1196229 ops/s 2764672 B/op 37960 allocs/op +BenchmarkTasks/Sleep10msW300K/100u-10Kt/Conc-24 2 916181717 ns/op 1091487 ops/s 57607072 B/op 1049330 allocs/op +BenchmarkTasks/Sleep10msW300K/100u-10Kt/ErrGroup-24 2 587781756 ns/op 1701312 ops/s 136003464 B/op 3000108 allocs/op +BenchmarkTasks/Sleep10msW300K/100u-10Kt/Gopool-24 2 739607080 ns/op 1352069 ops/s 73051016 B/op 1465776 allocs/op +BenchmarkTasks/Sleep10msW300K/100u-10Kt/GoroutinePool-24 2 815505540 ns/op 1226233 ops/s 57690368 B/op 1049459 allocs/op +BenchmarkTasks/Sleep10msW300K/100u-10Kt/BufferedPool-24 2 779365754 ns/op 1283095 ops/s 65733568 B/op 1049192 allocs/op +BenchmarkTasks/Sleep10msW300K/100u-10Kt/Pond-24 2 2462484996 ns/op 406094 ops/s 341723696 B/op 8020097 allocs/op +BenchmarkTasks/Sleep10msW300K/1Ku-1Kt/VarMQ-24 2 356646857 ns/op 2803894 ops/s 118407908 B/op 1444403 allocs/op +BenchmarkTasks/Sleep10msW300K/1Ku-1Kt/Ants-24 2 475853560 ns/op 2101487 ops/s 11487280 B/op 144775 allocs/op +BenchmarkTasks/Sleep10msW300K/1Ku-1Kt/WorkerPool-24 2 809077756 ns/op 1235975 ops/s 2929016 B/op 40753 allocs/op +BenchmarkTasks/Sleep10msW300K/1Ku-1Kt/Conc-24 2 975139288 ns/op 1025495 ops/s 57475072 B/op 1049508 allocs/op +BenchmarkTasks/Sleep10msW300K/1Ku-1Kt/ErrGroup-24 2 565765957 ns/op 1767515 ops/s 136042400 B/op 3001098 allocs/op +BenchmarkTasks/Sleep10msW300K/1Ku-1Kt/Gopool-24 2 697322320 ns/op 1434057 ops/s 72733220 B/op 1481226 allocs/op +BenchmarkTasks/Sleep10msW300K/1Ku-1Kt/GoroutinePool-24 2 934604229 ns/op 1069972 ops/s 57570512 B/op 1050457 allocs/op +BenchmarkTasks/Sleep10msW300K/1Ku-1Kt/BufferedPool-24 2 798124076 ns/op 1252938 ops/s 65549848 B/op 1050241 allocs/op +BenchmarkTasks/Sleep10msW300K/1Ku-1Kt/Pond-24 2 2683927876 ns/op 372588 ops/s 341136328 B/op 8015495 allocs/op +BenchmarkTasks/Sleep10msW300K/10Ku-100t/VarMQ-24 2 382029919 ns/op 2617596 ops/s 117909156 B/op 1441879 allocs/op +BenchmarkTasks/Sleep10msW300K/10Ku-100t/Ants-24 2 544737477 ns/op 1835747 ops/s 15532556 B/op 201831 allocs/op +BenchmarkTasks/Sleep10msW300K/10Ku-100t/WorkerPool-24 2 867923582 ns/op 1152175 ops/s 3187560 B/op 47993 allocs/op +BenchmarkTasks/Sleep10msW300K/10Ku-100t/Conc-24 2 1139916310 ns/op 877257 ops/s 57651072 B/op 1057314 allocs/op +BenchmarkTasks/Sleep10msW300K/10Ku-100t/ErrGroup-24 2 708943543 ns/op 1410550 ops/s 136536200 B/op 3011936 allocs/op +BenchmarkTasks/Sleep10msW300K/10Ku-100t/Gopool-24 2 770688521 ns/op 1297541 ops/s 74976068 B/op 1512335 allocs/op +BenchmarkTasks/Sleep10msW300K/10Ku-100t/GoroutinePool-24 2 950573615 ns/op 1051996 ops/s 57846416 B/op 1059349 allocs/op +BenchmarkTasks/Sleep10msW300K/10Ku-100t/BufferedPool-24 2 793956889 ns/op 1259514 ops/s 65823344 B/op 1059112 allocs/op +BenchmarkTasks/Sleep10msW300K/10Ku-100t/Pond-24 2 2099269344 ns/op 476356 ops/s 346455280 B/op 8040158 allocs/op +BenchmarkTasks/Sleep10msW300K/1Mu-1t/VarMQ-24 2 513355436 ns/op 1947968 ops/s 141839812 B/op 2245535 allocs/op +BenchmarkTasks/Sleep10msW300K/1Mu-1t/Ants-24 2 729469358 ns/op 1370860 ops/s 43278392 B/op 1140926 allocs/op +BenchmarkTasks/Sleep10msW300K/1Mu-1t/WorkerPool-24 2 1034002882 ns/op 967115 ops/s 84348336 B/op 1484724 allocs/op +BenchmarkTasks/Sleep10msW300K/1Mu-1t/Conc-24 2 952924534 ns/op 1049401 ops/s 89496384 B/op 2049080 allocs/op +BenchmarkTasks/Sleep10msW300K/1Mu-1t/ErrGroup-24 2 755547885 ns/op 1323543 ops/s 168000264 B/op 4000008 allocs/op +BenchmarkTasks/Sleep10msW300K/1Mu-1t/Gopool-24 2 1601282024 ns/op 624500 ops/s 144524672 B/op 2799331 allocs/op +BenchmarkTasks/Sleep10msW300K/1Mu-1t/GoroutinePool-24 2 856499511 ns/op 1167543 ops/s 89552008 B/op 2049577 allocs/op +BenchmarkTasks/Sleep10msW300K/1Mu-1t/BufferedPool-24 2 838246573 ns/op 1192966 ops/s 97505248 B/op 2049129 allocs/op +BenchmarkTasks/Sleep10msW300K/1Mu-1t/Pond-24 2 3722989665 ns/op 268601 ops/s 439489184 B/op 9206030 allocs/op +BenchmarkTasks/Loop10W300K/1u-1Mt/VarMQ-24 2 131460877 ns/op 7606826 ops/s 86165252 B/op 1003559 allocs/op +BenchmarkTasks/Loop10W300K/1u-1Mt/Ants-24 2 539028724 ns/op 1855189 ops/s 248148 B/op 3638 allocs/op +BenchmarkTasks/Loop10W300K/1u-1Mt/WorkerPool-24 2 742797070 ns/op 1346263 ops/s 1160 B/op 23 allocs/op +BenchmarkTasks/Loop10W300K/1u-1Mt/Conc-24 2 1148813034 ns/op 870464 ops/s 28711760 B/op 749218 allocs/op +BenchmarkTasks/Loop10W300K/1u-1Mt/ErrGroup-24 2 368783992 ns/op 2711614 ops/s 40000296 B/op 2000009 allocs/op +BenchmarkTasks/Loop10W300K/1u-1Mt/Gopool-24 2 1125838326 ns/op 888227 ops/s 16524172 B/op 987158 allocs/op +BenchmarkTasks/Loop10W300K/1u-1Mt/GoroutinePool-24 2 842721086 ns/op 1186632 ops/s 28743920 B/op 749506 allocs/op +BenchmarkTasks/Loop10W300K/1u-1Mt/BufferedPool-24 2 855646228 ns/op 1168707 ops/s 36706120 B/op 749137 allocs/op +BenchmarkTasks/Loop10W300K/1u-1Mt/Pond-24 2 2353110737 ns/op 424969 ops/s 240414112 B/op 7001146 allocs/op +BenchmarkTasks/Loop10W300K/100u-10Kt/VarMQ-24 2 86679134 ns/op 11536802 ops/s 86651116 B/op 1007166 allocs/op +BenchmarkTasks/Loop10W300K/100u-10Kt/Ants-24 2 401808206 ns/op 2488750 ops/s 128904 B/op 1830 allocs/op +BenchmarkTasks/Loop10W300K/100u-10Kt/WorkerPool-24 2 776442570 ns/op 1287925 ops/s 9600 B/op 240 allocs/op +BenchmarkTasks/Loop10W300K/100u-10Kt/Conc-24 2 1177132432 ns/op 849522 ops/s 28738392 B/op 749527 allocs/op +BenchmarkTasks/Loop10W300K/100u-10Kt/ErrGroup-24 2 360762542 ns/op 2771906 ops/s 40003464 B/op 2000108 allocs/op +BenchmarkTasks/Loop10W300K/100u-10Kt/Gopool-24 2 483335430 ns/op 2068957 ops/s 8860996 B/op 488559 allocs/op +BenchmarkTasks/Loop10W300K/100u-10Kt/GoroutinePool-24 2 1136759625 ns/op 879693 ops/s 28747536 B/op 749609 allocs/op +BenchmarkTasks/Loop10W300K/100u-10Kt/BufferedPool-24 2 989638952 ns/op 1010470 ops/s 36701392 B/op 749166 allocs/op +BenchmarkTasks/Loop10W300K/100u-10Kt/Pond-24 2 1486054028 ns/op 672923 ops/s 241382024 B/op 7004541 allocs/op +BenchmarkTasks/Loop10W300K/1Ku-1Kt/VarMQ-24 2 83643528 ns/op 11955498 ops/s 86838972 B/op 1009643 allocs/op +BenchmarkTasks/Loop10W300K/1Ku-1Kt/Ants-24 2 405581634 ns/op 2465595 ops/s 683732 B/op 10544 allocs/op +BenchmarkTasks/Loop10W300K/1Ku-1Kt/WorkerPool-24 2 715136430 ns/op 1398335 ops/s 104840 B/op 2145 allocs/op +BenchmarkTasks/Loop10W300K/1Ku-1Kt/Conc-24 2 817280597 ns/op 1223570 ops/s 28757560 B/op 750341 allocs/op +BenchmarkTasks/Loop10W300K/1Ku-1Kt/ErrGroup-24 2 565250386 ns/op 1769127 ops/s 40032264 B/op 2001008 allocs/op +BenchmarkTasks/Loop10W300K/1Ku-1Kt/Gopool-24 2 470769955 ns/op 2124180 ops/s 2583092 B/op 114636 allocs/op +BenchmarkTasks/Loop10W300K/1Ku-1Kt/GoroutinePool-24 2 1074402231 ns/op 930750 ops/s 28763792 B/op 750397 allocs/op +BenchmarkTasks/Loop10W300K/1Ku-1Kt/BufferedPool-24 2 936985114 ns/op 1067253 ops/s 36744864 B/op 750197 allocs/op +BenchmarkTasks/Loop10W300K/1Ku-1Kt/Pond-24 2 2513137922 ns/op 397909 ops/s 245418400 B/op 7018014 allocs/op +BenchmarkTasks/Loop10W300K/10Ku-100t/VarMQ-24 2 93351810 ns/op 10712165 ops/s 87159820 B/op 1018988 allocs/op +BenchmarkTasks/Loop10W300K/10Ku-100t/Ants-24 2 449043038 ns/op 2226958 ops/s 5648216 B/op 80241 allocs/op +BenchmarkTasks/Loop10W300K/10Ku-100t/WorkerPool-24 2 697419552 ns/op 1433857 ops/s 883640 B/op 15685 allocs/op +BenchmarkTasks/Loop10W300K/10Ku-100t/Conc-24 2 1120888653 ns/op 892149 ops/s 29000928 B/op 758942 allocs/op +BenchmarkTasks/Loop10W300K/10Ku-100t/ErrGroup-24 2 314964183 ns/op 3174964 ops/s 40320264 B/op 2010008 allocs/op +BenchmarkTasks/Loop10W300K/10Ku-100t/Gopool-24 2 351809598 ns/op 2842447 ops/s 2069644 B/op 62700 allocs/op +BenchmarkTasks/Loop10W300K/10Ku-100t/GoroutinePool-24 2 1025256698 ns/op 975365 ops/s 29018136 B/op 759096 allocs/op +BenchmarkTasks/Loop10W300K/10Ku-100t/BufferedPool-24 2 745524137 ns/op 1341338 ops/s 37014048 B/op 759029 allocs/op +BenchmarkTasks/Loop10W300K/10Ku-100t/Pond-24 2 2441379121 ns/op 409605 ops/s 260636856 B/op 7067474 allocs/op +BenchmarkTasks/Loop10W300K/1Mu-1t/VarMQ-24 2 233799002 ns/op 4277178 ops/s 120567692 B/op 2011994 allocs/op +BenchmarkTasks/Loop10W300K/1Mu-1t/Ants-24 2 476995780 ns/op 2096455 ops/s 33897060 B/op 1026305 allocs/op +BenchmarkTasks/Loop10W300K/1Mu-1t/WorkerPool-24 2 1135529780 ns/op 880646 ops/s 81372160 B/op 1441275 allocs/op +BenchmarkTasks/Loop10W300K/1Mu-1t/Conc-24 2 906004414 ns/op 1103747 ops/s 60692800 B/op 1749048 allocs/op +BenchmarkTasks/Loop10W300K/1Mu-1t/ErrGroup-24 2 340541644 ns/op 2936498 ops/s 72000264 B/op 3000008 allocs/op +BenchmarkTasks/Loop10W300K/1Mu-1t/Gopool-24 2 528215111 ns/op 1893168 ops/s 36474060 B/op 1264068 allocs/op +BenchmarkTasks/Loop10W300K/1Mu-1t/GoroutinePool-24 2 721775968 ns/op 1385471 ops/s 60723504 B/op 1749323 allocs/op +BenchmarkTasks/Loop10W300K/1Mu-1t/BufferedPool-24 2 682885233 ns/op 1464375 ops/s 68702504 B/op 1749104 allocs/op +BenchmarkTasks/Loop10W300K/1Mu-1t/Pond-24 2 5435558870 ns/op 183974 ops/s 362961472 B/op 8688230 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1u-1Mt/VarMQ-24 2 484124241 ns/op 2065585 ops/s 97795516 B/op 1175126 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1u-1Mt/Ants-24 2 668806986 ns/op 1495200 ops/s 11763504 B/op 148030 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1u-1Mt/WorkerPool-24 2 1769642769 ns/op 565086 ops/s 1326264 B/op 18449 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1u-1Mt/Conc-24 2 1075830246 ns/op 929515 ops/s 57555048 B/op 1049605 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1u-1Mt/ErrGroup-24 2 412897436 ns/op 2421909 ops/s 136000296 B/op 3000009 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1u-1Mt/Gopool-24 2 802021910 ns/op 1246849 ops/s 82814712 B/op 1677217 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1u-1Mt/GoroutinePool-24 2 1018322886 ns/op 982007 ops/s 57554392 B/op 1049599 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1u-1Mt/BufferedPool-24 2 861553542 ns/op 1160694 ops/s 65515528 B/op 1049221 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1u-1Mt/Pond-24 2 2899923462 ns/op 344837 ops/s 338702152 B/op 8008521 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/100u-10Kt/VarMQ-24 2 375304761 ns/op 2664501 ops/s 103883828 B/op 1241653 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/100u-10Kt/Ants-24 2 458840045 ns/op 2179409 ops/s 6389912 B/op 79690 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/100u-10Kt/WorkerPool-24 2 1152741932 ns/op 867497 ops/s 1401768 B/op 19553 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/100u-10Kt/Conc-24 2 925203043 ns/op 1080844 ops/s 57560288 B/op 1049714 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/100u-10Kt/ErrGroup-24 2 544090988 ns/op 1837928 ops/s 136003464 B/op 3000108 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/100u-10Kt/Gopool-24 2 723715207 ns/op 1381759 ops/s 70557340 B/op 1442426 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/100u-10Kt/GoroutinePool-24 2 968435912 ns/op 1032593 ops/s 57543840 B/op 1049576 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/100u-10Kt/BufferedPool-24 2 958326717 ns/op 1043485 ops/s 65507328 B/op 1049219 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/100u-10Kt/Pond-24 2 2918988904 ns/op 342584 ops/s 338661696 B/op 8008231 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Ku-1Kt/VarMQ-24 2 376811727 ns/op 2653845 ops/s 101862324 B/op 1219195 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Ku-1Kt/Ants-24 2 455934740 ns/op 2193296 ops/s 6488404 B/op 81314 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Ku-1Kt/WorkerPool-24 2 837580531 ns/op 1193915 ops/s 1459048 B/op 20874 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Ku-1Kt/Conc-24 2 1143088650 ns/op 874823 ops/s 57486472 B/op 1049629 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Ku-1Kt/ErrGroup-24 2 640484060 ns/op 1561319 ops/s 136040104 B/op 3001078 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Ku-1Kt/Gopool-24 2 693136593 ns/op 1442717 ops/s 70921924 B/op 1457264 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Ku-1Kt/GoroutinePool-24 2 828852028 ns/op 1206488 ops/s 57548784 B/op 1050263 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Ku-1Kt/BufferedPool-24 2 915950360 ns/op 1091762 ops/s 65526384 B/op 1050032 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Ku-1Kt/Pond-24 2 3030415322 ns/op 329988 ops/s 338668880 B/op 8008938 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/10Ku-100t/VarMQ-24 2 376234022 ns/op 2657920 ops/s 104426996 B/op 1257182 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/10Ku-100t/Ants-24 2 515434927 ns/op 1940109 ops/s 11774896 B/op 153781 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/10Ku-100t/WorkerPool-24 2 895539773 ns/op 1116645 ops/s 2211184 B/op 34075 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/10Ku-100t/Conc-24 2 892257586 ns/op 1120753 ops/s 57826680 B/op 1059140 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/10Ku-100t/ErrGroup-24 2 609952536 ns/op 1639472 ops/s 136492240 B/op 3011543 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/10Ku-100t/Gopool-24 2 701626978 ns/op 1425259 ops/s 74080412 B/op 1503176 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/10Ku-100t/GoroutinePool-24 2 895056637 ns/op 1117248 ops/s 57830624 B/op 1059208 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/10Ku-100t/BufferedPool-24 2 784478708 ns/op 1274732 ops/s 65821944 B/op 1059099 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/10Ku-100t/Pond-24 2 2204661994 ns/op 453584 ops/s 345111184 B/op 8041939 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Mu-1t/VarMQ-24 2 512337344 ns/op 1951839 ops/s 133561948 B/op 2136271 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Mu-1t/Ants-24 2 757854484 ns/op 1319515 ops/s 39124108 B/op 1090187 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Mu-1t/WorkerPool-24 2 1015972652 ns/op 984278 ops/s 82342760 B/op 1461271 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Mu-1t/Conc-24 2 939179120 ns/op 1064760 ops/s 89508872 B/op 2049192 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Mu-1t/ErrGroup-24 2 679386650 ns/op 1471916 ops/s 168000264 B/op 4000008 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Mu-1t/Gopool-24 2 1393155442 ns/op 717795 ops/s 143848676 B/op 2792686 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Mu-1t/GoroutinePool-24 2 813224168 ns/op 1229673 ops/s 89552736 B/op 2049584 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Mu-1t/BufferedPool-24 2 833916445 ns/op 1199161 ops/s 97510680 B/op 2049177 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Mu-1t/Pond-24 2 4063102106 ns/op 246117 ops/s 436291824 B/op 9187169 allocs/op +BenchmarkTasks/Loop10W1/1u-1Mt/VarMQ-24 2 168329866 ns/op 5940716 ops/s 86094052 B/op 1002979 allocs/op +BenchmarkTasks/Loop10W1/1u-1Mt/Ants-24 2 376425765 ns/op 2656566 ops/s 4996 B/op 37 allocs/op +BenchmarkTasks/Loop10W1/1u-1Mt/WorkerPool-24 2 372301572 ns/op 2685995 ops/s 6625864 B/op 1529 allocs/op +BenchmarkTasks/Loop10W1/1u-1Mt/Conc-24 2 186196000 ns/op 5370685 ops/s 448 B/op 12 allocs/op +BenchmarkTasks/Loop10W1/1u-1Mt/ErrGroup-24 2 348532643 ns/op 2869172 ops/s 40000296 B/op 2000009 allocs/op +BenchmarkTasks/Loop10W1/1u-1Mt/Gopool-24 2 80489746 ns/op 12423943 ops/s 1979228 B/op 12515 allocs/op +BenchmarkTasks/Loop10W1/1u-1Mt/GoroutinePool-24 2 231834718 ns/op 4313418 ops/s 296 B/op 11 allocs/op +BenchmarkTasks/Loop10W1/1u-1Mt/BufferedPool-24 2 39903581 ns/op 25060407 ops/s 8003880 B/op 12 allocs/op +BenchmarkTasks/Loop10W1/1u-1Mt/Pond-24 2 337918868 ns/op 2959290 ops/s 240066112 B/op 6001161 allocs/op +BenchmarkTasks/Loop10W1/100u-10Kt/VarMQ-24 2 145571114 ns/op 6869495 ops/s 86153740 B/op 1003085 allocs/op +BenchmarkTasks/Loop10W1/100u-10Kt/Ants-24 2 629522230 ns/op 1588506 ops/s 8164 B/op 136 allocs/op +BenchmarkTasks/Loop10W1/100u-10Kt/WorkerPool-24 2 1216273886 ns/op 822183 ops/s 25179960 B/op 162 allocs/op +BenchmarkTasks/Loop10W1/100u-10Kt/Conc-24 2 1534486856 ns/op 651684 ops/s 4008 B/op 114 allocs/op +BenchmarkTasks/Loop10W1/100u-10Kt/ErrGroup-24 2 605202342 ns/op 1652340 ops/s 40003464 B/op 2000108 allocs/op +BenchmarkTasks/Loop10W1/100u-10Kt/Gopool-24 2 240708660 ns/op 4154400 ops/s 32608324 B/op 493415 allocs/op +BenchmarkTasks/Loop10W1/100u-10Kt/GoroutinePool-24 2 633602711 ns/op 1578276 ops/s 3856 B/op 113 allocs/op +BenchmarkTasks/Loop10W1/100u-10Kt/BufferedPool-24 2 40232502 ns/op 24855526 ops/s 8007048 B/op 111 allocs/op +BenchmarkTasks/Loop10W1/100u-10Kt/Pond-24 2 1015525064 ns/op 984712 ops/s 336484784 B/op 6008351 allocs/op +BenchmarkTasks/Loop10W1/1Ku-1Kt/VarMQ-24 2 145033140 ns/op 6894976 ops/s 86148628 B/op 1003981 allocs/op +BenchmarkTasks/Loop10W1/1Ku-1Kt/Ants-24 2 545059676 ns/op 1834661 ops/s 66812 B/op 1302 allocs/op +BenchmarkTasks/Loop10W1/1Ku-1Kt/WorkerPool-24 2 1011297450 ns/op 988829 ops/s 25247904 B/op 1411 allocs/op +BenchmarkTasks/Loop10W1/1Ku-1Kt/Conc-24 2 1239118998 ns/op 807025 ops/s 118432 B/op 1779 allocs/op +BenchmarkTasks/Loop10W1/1Ku-1Kt/ErrGroup-24 2 833065751 ns/op 1200385 ops/s 40056624 B/op 2001225 allocs/op +BenchmarkTasks/Loop10W1/1Ku-1Kt/Gopool-24 2 275992875 ns/op 3623282 ops/s 32846956 B/op 500686 allocs/op +BenchmarkTasks/Loop10W1/1Ku-1Kt/GoroutinePool-24 2 739431678 ns/op 1352390 ops/s 64688 B/op 1299 allocs/op +BenchmarkTasks/Loop10W1/1Ku-1Kt/BufferedPool-24 2 39482228 ns/op 25327851 ops/s 8035848 B/op 1011 allocs/op +BenchmarkTasks/Loop10W1/1Ku-1Kt/Pond-24 2 759130052 ns/op 1317297 ops/s 337059928 B/op 6009536 allocs/op +BenchmarkTasks/Loop10W1/10Ku-100t/VarMQ-24 2 152352004 ns/op 6563747 ops/s 86436628 B/op 1012981 allocs/op +BenchmarkTasks/Loop10W1/10Ku-100t/Ants-24 2 641032730 ns/op 1559983 ops/s 796540 B/op 14246 allocs/op +BenchmarkTasks/Loop10W1/10Ku-100t/WorkerPool-24 2 1196832970 ns/op 835538 ops/s 26054240 B/op 15039 allocs/op +BenchmarkTasks/Loop10W1/10Ku-100t/Conc-24 2 1977900466 ns/op 505587 ops/s 1381280 B/op 19483 allocs/op +BenchmarkTasks/Loop10W1/10Ku-100t/ErrGroup-24 2 771502986 ns/op 1296171 ops/s 40789432 B/op 2014197 allocs/op +BenchmarkTasks/Loop10W1/10Ku-100t/Gopool-24 2 297825802 ns/op 3357667 ops/s 33355164 B/op 512016 allocs/op +BenchmarkTasks/Loop10W1/10Ku-100t/GoroutinePool-24 2 617278886 ns/op 1620013 ops/s 784392 B/op 14154 allocs/op +BenchmarkTasks/Loop10W1/10Ku-100t/BufferedPool-24 2 46761968 ns/op 21384900 ops/s 8323848 B/op 10011 allocs/op +BenchmarkTasks/Loop10W1/10Ku-100t/Pond-24 2 889247892 ns/op 1124546 ops/s 337721768 B/op 6022599 allocs/op +BenchmarkTasks/Loop10W1/1Mu-1t/VarMQ-24 2 240203465 ns/op 4163137 ops/s 122039412 B/op 2003503 allocs/op +BenchmarkTasks/Loop10W1/1Mu-1t/Ants-24 2 1261269211 ns/op 792852 ops/s 77518180 B/op 1406404 allocs/op +BenchmarkTasks/Loop10W1/1Mu-1t/WorkerPool-24 2 1007481652 ns/op 992574 ops/s 109430216 B/op 1461002 allocs/op +BenchmarkTasks/Loop10W1/1Mu-1t/Conc-24 2 1246871876 ns/op 802007 ops/s 143238296 B/op 1953878 allocs/op +BenchmarkTasks/Loop10W1/1Mu-1t/ErrGroup-24 2 856174595 ns/op 1167986 ops/s 137024976 B/op 3512123 allocs/op +BenchmarkTasks/Loop10W1/1Mu-1t/Gopool-24 2 457062384 ns/op 2187885 ops/s 67278180 B/op 1488396 allocs/op +BenchmarkTasks/Loop10W1/1Mu-1t/GoroutinePool-24 2 508376052 ns/op 1967048 ops/s 81044952 B/op 1437909 allocs/op +BenchmarkTasks/Loop10W1/1Mu-1t/BufferedPool-24 2 231704486 ns/op 4315842 ops/s 40003848 B/op 1000011 allocs/op +BenchmarkTasks/Loop10W1/1Mu-1t/Pond-24 2 975920516 ns/op 1024674 ops/s 383540408 B/op 7140288 allocs/op +BenchmarkTasks/Loop10KW1/1u-1Mt/VarMQ-24 2 1133713456 ns/op 882057 ops/s 86094332 B/op 1002981 allocs/op +BenchmarkTasks/Loop10KW1/1u-1Mt/Ants-24 2 1446811220 ns/op 691175 ops/s 5444 B/op 41 allocs/op +BenchmarkTasks/Loop10KW1/1u-1Mt/WorkerPool-24 2 2203343962 ns/op 453856 ops/s 25175616 B/op 52 allocs/op +BenchmarkTasks/Loop10KW1/1u-1Mt/Conc-24 2 1394918328 ns/op 716888 ops/s 448 B/op 12 allocs/op +BenchmarkTasks/Loop10KW1/1u-1Mt/ErrGroup-24 2 1560332942 ns/op 640889 ops/s 40000296 B/op 2000009 allocs/op +BenchmarkTasks/Loop10KW1/1u-1Mt/Gopool-24 2 1030490560 ns/op 970412 ops/s 34342808 B/op 483101 allocs/op +BenchmarkTasks/Loop10KW1/1u-1Mt/GoroutinePool-24 2 1365815552 ns/op 732163 ops/s 352 B/op 11 allocs/op +BenchmarkTasks/Loop10KW1/1u-1Mt/BufferedPool-24 2 1026826016 ns/op 973875 ops/s 8003880 B/op 12 allocs/op +BenchmarkTasks/Loop10KW1/1u-1Mt/Pond-24 2 1396914662 ns/op 715863 ops/s 294142552 B/op 6005123 allocs/op +BenchmarkTasks/Loop10KW1/100u-10Kt/VarMQ-24 2 1129657606 ns/op 885224 ops/s 86198956 B/op 1003091 allocs/op +BenchmarkTasks/Loop10KW1/100u-10Kt/Ants-24 2 1509667122 ns/op 662398 ops/s 13764 B/op 186 allocs/op +BenchmarkTasks/Loop10KW1/100u-10Kt/WorkerPool-24 2 2325506138 ns/op 430014 ops/s 25185224 B/op 209 allocs/op +BenchmarkTasks/Loop10KW1/100u-10Kt/Conc-24 2 1740792468 ns/op 574451 ops/s 10056 B/op 168 allocs/op +BenchmarkTasks/Loop10KW1/100u-10Kt/ErrGroup-24 2 1540220630 ns/op 649258 ops/s 40006152 B/op 2000132 allocs/op +BenchmarkTasks/Loop10KW1/100u-10Kt/Gopool-24 2 1230460249 ns/op 812704 ops/s 34790116 B/op 496820 allocs/op +BenchmarkTasks/Loop10KW1/100u-10Kt/GoroutinePool-24 2 1315355306 ns/op 760251 ops/s 6544 B/op 137 allocs/op +BenchmarkTasks/Loop10KW1/100u-10Kt/BufferedPool-24 2 1042486823 ns/op 959245 ops/s 8007048 B/op 111 allocs/op +BenchmarkTasks/Loop10KW1/100u-10Kt/Pond-24 2 2043424600 ns/op 489375 ops/s 336710936 B/op 6008436 allocs/op +BenchmarkTasks/Loop10KW1/1Ku-1Kt/VarMQ-24 2 1137929597 ns/op 878789 ops/s 86227756 B/op 1003991 allocs/op +BenchmarkTasks/Loop10KW1/1Ku-1Kt/Ants-24 2 1596736175 ns/op 626278 ops/s 69836 B/op 1329 allocs/op +BenchmarkTasks/Loop10KW1/1Ku-1Kt/WorkerPool-24 2 2349396160 ns/op 425641 ops/s 25281112 B/op 1708 allocs/op +BenchmarkTasks/Loop10KW1/1Ku-1Kt/Conc-24 2 1591650374 ns/op 628279 ops/s 98328 B/op 1599 allocs/op +BenchmarkTasks/Loop10KW1/1Ku-1Kt/ErrGroup-24 2 1686703700 ns/op 592872 ops/s 40063960 B/op 2001291 allocs/op +BenchmarkTasks/Loop10KW1/1Ku-1Kt/Gopool-24 2 1235184642 ns/op 809596 ops/s 32848988 B/op 501018 allocs/op +BenchmarkTasks/Loop10KW1/1Ku-1Kt/GoroutinePool-24 2 1323775029 ns/op 755415 ops/s 61328 B/op 1269 allocs/op +BenchmarkTasks/Loop10KW1/1Ku-1Kt/BufferedPool-24 2 1034072828 ns/op 967050 ops/s 8035848 B/op 1011 allocs/op +BenchmarkTasks/Loop10KW1/1Ku-1Kt/Pond-24 2 1997455272 ns/op 500637 ops/s 337268080 B/op 6009703 allocs/op +BenchmarkTasks/Loop10KW1/10Ku-100t/VarMQ-24 2 1128282111 ns/op 886303 ops/s 86459236 B/op 1012984 allocs/op +BenchmarkTasks/Loop10KW1/10Ku-100t/Ants-24 2 1835580038 ns/op 544787 ops/s 801468 B/op 14290 allocs/op +BenchmarkTasks/Loop10KW1/10Ku-100t/WorkerPool-24 2 2065956378 ns/op 484037 ops/s 26059000 B/op 15082 allocs/op +BenchmarkTasks/Loop10KW1/10Ku-100t/Conc-24 2 1836674081 ns/op 544462 ops/s 1352160 B/op 19223 allocs/op +BenchmarkTasks/Loop10KW1/10Ku-100t/ErrGroup-24 2 1857574002 ns/op 538337 ops/s 40805560 B/op 2014341 allocs/op +BenchmarkTasks/Loop10KW1/10Ku-100t/Gopool-24 2 1252630234 ns/op 798320 ops/s 33377892 B/op 512364 allocs/op +BenchmarkTasks/Loop10KW1/10Ku-100t/GoroutinePool-24 2 1388006770 ns/op 720458 ops/s 776384 B/op 14082 allocs/op +BenchmarkTasks/Loop10KW1/10Ku-100t/BufferedPool-24 2 1034394260 ns/op 966749 ops/s 8323848 B/op 10011 allocs/op +BenchmarkTasks/Loop10KW1/10Ku-100t/Pond-24 2 1995059416 ns/op 501238 ops/s 337827768 B/op 6023062 allocs/op +BenchmarkTasks/Loop10KW1/1Mu-1t/VarMQ-24 2 1308398770 ns/op 764293 ops/s 123102244 B/op 2003644 allocs/op +BenchmarkTasks/Loop10KW1/1Mu-1t/Ants-24 2 2278230936 ns/op 438937 ops/s 82641396 B/op 1452147 allocs/op +BenchmarkTasks/Loop10KW1/1Mu-1t/WorkerPool-24 2 1868314958 ns/op 535242 ops/s 109905240 B/op 1470852 allocs/op +BenchmarkTasks/Loop10KW1/1Mu-1t/Conc-24 2 1962912926 ns/op 509447 ops/s 129506048 B/op 1870597 allocs/op +BenchmarkTasks/Loop10KW1/1Mu-1t/ErrGroup-24 2 2301730906 ns/op 434456 ops/s 126461440 B/op 3486268 allocs/op +BenchmarkTasks/Loop10KW1/1Mu-1t/Gopool-24 2 1411998852 ns/op 708216 ops/s 69261044 B/op 1501555 allocs/op +BenchmarkTasks/Loop10KW1/1Mu-1t/GoroutinePool-24 2 1620086380 ns/op 617251 ops/s 86426664 B/op 1485960 allocs/op +BenchmarkTasks/Loop10KW1/1Mu-1t/BufferedPool-24 2 1184548264 ns/op 844204 ops/s 40003960 B/op 1000012 allocs/op +BenchmarkTasks/Loop10KW1/1Mu-1t/Pond-24 2 1973636586 ns/op 506679 ops/s 384772720 B/op 7150809 allocs/op +PASS +ok github.com/goptics/benchmarks/pool 943.059s diff --git a/pool/bench/pool-4cpu.txt b/pool/bench/pool-4cpu.txt new file mode 100644 index 0000000..7db8221 --- /dev/null +++ b/pool/bench/pool-4cpu.txt @@ -0,0 +1,501 @@ +goos: linux +goarch: amd64 +pkg: github.com/goptics/benchmarks/pool +cpu: 13th Gen Intel(R) Core(TM) i7-13700 +BenchmarkTasks/Sleep10msW50K/1u-1Mt/VarMQ-4 2 398903620 ns/op 2506871 ops/s 138926632 B/op 1490511 allocs/op +BenchmarkTasks/Sleep10msW50K/1u-1Mt/Ants-4 2 517147680 ns/op 1933684 ops/s 25468792 B/op 299810 allocs/op +BenchmarkTasks/Sleep10msW50K/1u-1Mt/WorkerPool-4 2 729743840 ns/op 1370344 ops/s 3184848 B/op 43134 allocs/op +BenchmarkTasks/Sleep10msW50K/1u-1Mt/Conc-4 2 537617648 ns/op 1860058 ops/s 10941272 B/op 186982 allocs/op +BenchmarkTasks/Sleep10msW50K/1u-1Mt/ErrGroup-4 2 434044096 ns/op 2303913 ops/s 136443368 B/op 3003965 allocs/op +BenchmarkTasks/Sleep10msW50K/1u-1Mt/Gopool-4 2 469415296 ns/op 2130310 ops/s 69398204 B/op 1521623 allocs/op +BenchmarkTasks/Sleep10msW50K/1u-1Mt/GoroutinePool-4 2 496168898 ns/op 2015443 ops/s 9595392 B/op 174936 allocs/op +BenchmarkTasks/Sleep10msW50K/1u-1Mt/BufferedPool-4 2 271607438 ns/op 3681784 ops/s 20583936 B/op 199790 allocs/op +BenchmarkTasks/Sleep10msW50K/1u-1Mt/Pond-4 2 1653706836 ns/op 604702 ops/s 364132024 B/op 8220100 allocs/op +BenchmarkTasks/Sleep10msW50K/100u-10Kt/VarMQ-4 2 392831936 ns/op 2545618 ops/s 122754672 B/op 1438090 allocs/op +BenchmarkTasks/Sleep10msW50K/100u-10Kt/Ants-4 2 445061183 ns/op 2246882 ops/s 15312572 B/op 190962 allocs/op +BenchmarkTasks/Sleep10msW50K/100u-10Kt/WorkerPool-4 2 635466090 ns/op 1573648 ops/s 3388832 B/op 46058 allocs/op +BenchmarkTasks/Sleep10msW50K/100u-10Kt/Conc-4 2 617005431 ns/op 1620731 ops/s 11250200 B/op 189811 allocs/op +BenchmarkTasks/Sleep10msW50K/100u-10Kt/ErrGroup-4 2 475596136 ns/op 2102624 ops/s 136712256 B/op 3006436 allocs/op +BenchmarkTasks/Sleep10msW50K/100u-10Kt/Gopool-4 2 510065813 ns/op 1960531 ops/s 71813356 B/op 1366133 allocs/op +BenchmarkTasks/Sleep10msW50K/100u-10Kt/GoroutinePool-4 2 529851184 ns/op 1887322 ops/s 9595136 B/op 175034 allocs/op +BenchmarkTasks/Sleep10msW50K/100u-10Kt/BufferedPool-4 2 274052014 ns/op 3648942 ops/s 20381752 B/op 199883 allocs/op +BenchmarkTasks/Sleep10msW50K/100u-10Kt/Pond-4 2 1538336522 ns/op 650053 ops/s 361126900 B/op 8193318 allocs/op +BenchmarkTasks/Sleep10msW50K/1Ku-1Kt/VarMQ-4 2 393712714 ns/op 2539923 ops/s 121080864 B/op 1415323 allocs/op +BenchmarkTasks/Sleep10msW50K/1Ku-1Kt/Ants-4 2 450048260 ns/op 2221984 ops/s 13052108 B/op 162766 allocs/op +BenchmarkTasks/Sleep10msW50K/1Ku-1Kt/WorkerPool-4 2 640391759 ns/op 1561544 ops/s 3560928 B/op 48888 allocs/op +BenchmarkTasks/Sleep10msW50K/1Ku-1Kt/Conc-4 2 613006518 ns/op 1631304 ops/s 11570360 B/op 192893 allocs/op +BenchmarkTasks/Sleep10msW50K/1Ku-1Kt/ErrGroup-4 2 496131008 ns/op 2015597 ops/s 137401968 B/op 3013237 allocs/op +BenchmarkTasks/Sleep10msW50K/1Ku-1Kt/Gopool-4 2 519113948 ns/op 1926359 ops/s 46560236 B/op 809509 allocs/op +BenchmarkTasks/Sleep10msW50K/1Ku-1Kt/GoroutinePool-4 2 522151382 ns/op 1915153 ops/s 9618728 B/op 175887 allocs/op +BenchmarkTasks/Sleep10msW50K/1Ku-1Kt/BufferedPool-4 2 274330107 ns/op 3645243 ops/s 20397448 B/op 200666 allocs/op +BenchmarkTasks/Sleep10msW50K/1Ku-1Kt/Pond-4 2 1535930574 ns/op 651071 ops/s 347685808 B/op 8073973 allocs/op +BenchmarkTasks/Sleep10msW50K/10Ku-100t/VarMQ-4 2 384522623 ns/op 2600627 ops/s 121673208 B/op 1405219 allocs/op +BenchmarkTasks/Sleep10msW50K/10Ku-100t/Ants-4 2 508748276 ns/op 1965609 ops/s 19119300 B/op 241225 allocs/op +BenchmarkTasks/Sleep10msW50K/10Ku-100t/WorkerPool-4 2 698354938 ns/op 1431937 ops/s 3562296 B/op 54125 allocs/op +BenchmarkTasks/Sleep10msW50K/10Ku-100t/Conc-4 2 716684204 ns/op 1395315 ops/s 14186680 B/op 211325 allocs/op +BenchmarkTasks/Sleep10msW50K/10Ku-100t/ErrGroup-4 2 543551209 ns/op 1839753 ops/s 137619632 B/op 3021609 allocs/op +BenchmarkTasks/Sleep10msW50K/10Ku-100t/Gopool-4 2 483133654 ns/op 2069821 ops/s 25633056 B/op 347321 allocs/op +BenchmarkTasks/Sleep10msW50K/10Ku-100t/GoroutinePool-4 2 493445520 ns/op 2026566 ops/s 9902584 B/op 184850 allocs/op +BenchmarkTasks/Sleep10msW50K/10Ku-100t/BufferedPool-4 2 276583970 ns/op 3615539 ops/s 21481432 B/op 210529 allocs/op +BenchmarkTasks/Sleep10msW50K/10Ku-100t/Pond-4 2 1304759955 ns/op 766425 ops/s 325439680 B/op 7554195 allocs/op +BenchmarkTasks/Sleep10msW50K/1Mu-1t/VarMQ-4 2 680868476 ns/op 1468712 ops/s 147692732 B/op 2376696 allocs/op +BenchmarkTasks/Sleep10msW50K/1Mu-1t/Ants-4 2 649678084 ns/op 1539224 ops/s 44751240 B/op 1162078 allocs/op +BenchmarkTasks/Sleep10msW50K/1Mu-1t/WorkerPool-4 2 963970090 ns/op 1037377 ops/s 208643832 B/op 1620311 allocs/op +BenchmarkTasks/Sleep10msW50K/1Mu-1t/Conc-4 2 743660344 ns/op 1344700 ops/s 41585256 B/op 1174874 allocs/op +BenchmarkTasks/Sleep10msW50K/1Mu-1t/ErrGroup-4 2 503718536 ns/op 1985236 ops/s 168304400 B/op 4002723 allocs/op +BenchmarkTasks/Sleep10msW50K/1Mu-1t/Gopool-4 2 517781450 ns/op 1931317 ops/s 110100336 B/op 2642120 allocs/op +BenchmarkTasks/Sleep10msW50K/1Mu-1t/GoroutinePool-4 2 661862604 ns/op 1510888 ops/s 41593000 B/op 1174943 allocs/op +BenchmarkTasks/Sleep10msW50K/1Mu-1t/BufferedPool-4 2 659082985 ns/op 1517260 ops/s 49590424 B/op 1174889 allocs/op +BenchmarkTasks/Sleep10msW50K/1Mu-1t/Pond-4 2 1589023537 ns/op 629317 ops/s 348461480 B/op 7405806 allocs/op +BenchmarkTasks/Loop10W50K/1u-1Mt/VarMQ-4 2 111261902 ns/op 8987803 ops/s 86210636 B/op 1003644 allocs/op +BenchmarkTasks/Loop10W50K/1u-1Mt/Ants-4 2 272235401 ns/op 3673292 ops/s 258512 B/op 3759 allocs/op +BenchmarkTasks/Loop10W50K/1u-1Mt/WorkerPool-4 2 667209480 ns/op 1498780 ops/s 1128 B/op 22 allocs/op +BenchmarkTasks/Loop10W50K/1u-1Mt/Conc-4 2 428381630 ns/op 2334367 ops/s 4784840 B/op 124871 allocs/op +BenchmarkTasks/Loop10W50K/1u-1Mt/ErrGroup-4 2 280847442 ns/op 3560652 ops/s 40000296 B/op 2000009 allocs/op +BenchmarkTasks/Loop10W50K/1u-1Mt/Gopool-4 2 393855532 ns/op 2539002 ops/s 16131600 B/op 973509 allocs/op +BenchmarkTasks/Loop10W50K/1u-1Mt/GoroutinePool-4 2 342986192 ns/op 2915569 ops/s 4792976 B/op 124944 allocs/op +BenchmarkTasks/Loop10W50K/1u-1Mt/BufferedPool-4 2 340854028 ns/op 2933807 ops/s 12790736 B/op 124893 allocs/op +BenchmarkTasks/Loop10W50K/1u-1Mt/Pond-4 2 1173676818 ns/op 852023 ops/s 240527592 B/op 7000709 allocs/op +BenchmarkTasks/Loop10W50K/100u-10Kt/VarMQ-4 2 101753320 ns/op 9827689 ops/s 87094700 B/op 1008966 allocs/op +BenchmarkTasks/Loop10W50K/100u-10Kt/Ants-4 2 339461347 ns/op 2945843 ops/s 81308 B/op 1346 allocs/op +BenchmarkTasks/Loop10W50K/100u-10Kt/WorkerPool-4 2 434847660 ns/op 2299656 ops/s 9696 B/op 240 allocs/op +BenchmarkTasks/Loop10W50K/100u-10Kt/Conc-4 2 394355478 ns/op 2535783 ops/s 4803072 B/op 125104 allocs/op +BenchmarkTasks/Loop10W50K/100u-10Kt/ErrGroup-4 2 372778410 ns/op 2682559 ops/s 40003464 B/op 2000108 allocs/op +BenchmarkTasks/Loop10W50K/100u-10Kt/Gopool-4 2 423296402 ns/op 2362411 ops/s 12486820 B/op 764729 allocs/op +BenchmarkTasks/Loop10W50K/100u-10Kt/GoroutinePool-4 2 358255774 ns/op 2791302 ops/s 4798832 B/op 125067 allocs/op +BenchmarkTasks/Loop10W50K/100u-10Kt/BufferedPool-4 2 197452388 ns/op 5064512 ops/s 12793792 B/op 124991 allocs/op +BenchmarkTasks/Loop10W50K/100u-10Kt/Pond-4 2 1138072862 ns/op 878678 ops/s 240929232 B/op 7002432 allocs/op +BenchmarkTasks/Loop10W50K/1Ku-1Kt/VarMQ-4 2 104462092 ns/op 9572851 ops/s 87083020 B/op 1011750 allocs/op +BenchmarkTasks/Loop10W50K/1Ku-1Kt/Ants-4 2 341095786 ns/op 2931728 ops/s 508628 B/op 7728 allocs/op +BenchmarkTasks/Loop10W50K/1Ku-1Kt/WorkerPool-4 2 484506932 ns/op 2063954 ops/s 143968 B/op 2484 allocs/op +BenchmarkTasks/Loop10W50K/1Ku-1Kt/Conc-4 2 365143422 ns/op 2738650 ops/s 4866536 B/op 126314 allocs/op +BenchmarkTasks/Loop10W50K/1Ku-1Kt/ErrGroup-4 2 356696922 ns/op 2803500 ops/s 40045984 B/op 2001130 allocs/op +BenchmarkTasks/Loop10W50K/1Ku-1Kt/Gopool-4 2 337317682 ns/op 2964564 ops/s 5097328 B/op 290482 allocs/op +BenchmarkTasks/Loop10W50K/1Ku-1Kt/GoroutinePool-4 2 338529162 ns/op 2953955 ops/s 4878312 B/op 126419 allocs/op +BenchmarkTasks/Loop10W50K/1Ku-1Kt/BufferedPool-4 2 311557240 ns/op 3209683 ops/s 12820520 B/op 125872 allocs/op +BenchmarkTasks/Loop10W50K/1Ku-1Kt/Pond-4 2 1243151942 ns/op 804407 ops/s 243324240 B/op 7014062 allocs/op +BenchmarkTasks/Loop10W50K/10Ku-100t/VarMQ-4 2 109819472 ns/op 9105853 ops/s 87862740 B/op 1024685 allocs/op +BenchmarkTasks/Loop10W50K/10Ku-100t/Ants-4 2 368361631 ns/op 2714724 ops/s 4240344 B/op 62272 allocs/op +BenchmarkTasks/Loop10W50K/10Ku-100t/WorkerPool-4 2 519354526 ns/op 1925467 ops/s 944384 B/op 16152 allocs/op +BenchmarkTasks/Loop10W50K/10Ku-100t/Conc-4 2 348148299 ns/op 2872339 ops/s 5370976 B/op 137246 allocs/op +BenchmarkTasks/Loop10W50K/10Ku-100t/ErrGroup-4 2 329417764 ns/op 3035659 ops/s 40343840 B/op 2010218 allocs/op +BenchmarkTasks/Loop10W50K/10Ku-100t/Gopool-4 2 373804858 ns/op 2675193 ops/s 9542136 B/op 514094 allocs/op +BenchmarkTasks/Loop10W50K/10Ku-100t/GoroutinePool-4 2 295902389 ns/op 3379493 ops/s 5380960 B/op 137336 allocs/op +BenchmarkTasks/Loop10W50K/10Ku-100t/BufferedPool-4 2 301790052 ns/op 3313562 ops/s 13104936 B/op 134840 allocs/op +BenchmarkTasks/Loop10W50K/10Ku-100t/Pond-4 2 1334186622 ns/op 749520 ops/s 252844632 B/op 7059799 allocs/op +BenchmarkTasks/Loop10W50K/1Mu-1t/VarMQ-4 2 248038051 ns/op 4031639 ops/s 118232276 B/op 2003918 allocs/op +BenchmarkTasks/Loop10W50K/1Mu-1t/Ants-4 2 364105410 ns/op 2746457 ops/s 32269732 B/op 1003870 allocs/op +BenchmarkTasks/Loop10W50K/1Mu-1t/WorkerPool-4 2 728347087 ns/op 1372972 ops/s 65307768 B/op 1301334 allocs/op +BenchmarkTasks/Loop10W50K/1Mu-1t/Conc-4 2 593276602 ns/op 1685554 ops/s 36780160 B/op 1124828 allocs/op +BenchmarkTasks/Loop10W50K/1Mu-1t/ErrGroup-4 2 257235024 ns/op 3887495 ops/s 72000264 B/op 3000008 allocs/op +BenchmarkTasks/Loop10W50K/1Mu-1t/Gopool-4 2 409138910 ns/op 2444158 ops/s 47196448 B/op 1947898 allocs/op +BenchmarkTasks/Loop10W50K/1Mu-1t/GoroutinePool-4 2 481194089 ns/op 2078164 ops/s 36788576 B/op 1124904 allocs/op +BenchmarkTasks/Loop10W50K/1Mu-1t/BufferedPool-4 2 483721268 ns/op 2067306 ops/s 44789976 B/op 1124885 allocs/op +BenchmarkTasks/Loop10W50K/1Mu-1t/Pond-4 2 1684949434 ns/op 593490 ops/s 303717032 B/op 7826846 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1u-1Mt/VarMQ-4 2 364169867 ns/op 2745971 ops/s 117365484 B/op 1373131 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1u-1Mt/Ants-4 2 465158605 ns/op 2149804 ops/s 11939252 B/op 150093 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1u-1Mt/WorkerPool-4 2 712507766 ns/op 1403493 ops/s 1664608 B/op 22643 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1u-1Mt/Conc-4 2 554302350 ns/op 1804070 ops/s 9586800 B/op 174888 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1u-1Mt/ErrGroup-4 2 402080070 ns/op 2487067 ops/s 136000352 B/op 3000009 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1u-1Mt/Gopool-4 2 435190510 ns/op 2297844 ops/s 64412640 B/op 1479850 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1u-1Mt/GoroutinePool-4 2 504147386 ns/op 1983547 ops/s 9594824 B/op 174960 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1u-1Mt/BufferedPool-4 2 503622038 ns/op 1985616 ops/s 17590120 B/op 174887 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1u-1Mt/Pond-4 2 1475118595 ns/op 677912 ops/s 339300624 B/op 8013865 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/100u-10Kt/VarMQ-4 2 351321372 ns/op 2846397 ops/s 115151124 B/op 1335734 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/100u-10Kt/Ants-4 2 437752780 ns/op 2284394 ops/s 9078692 B/op 115299 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/100u-10Kt/WorkerPool-4 2 629697562 ns/op 1588064 ops/s 1769480 B/op 24157 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/100u-10Kt/Conc-4 2 615411718 ns/op 1624928 ops/s 9591536 B/op 175001 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/100u-10Kt/ErrGroup-4 2 495546467 ns/op 2017974 ops/s 136123640 B/op 3001181 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/100u-10Kt/Gopool-4 2 519934985 ns/op 1923317 ops/s 66766496 B/op 1435738 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/100u-10Kt/GoroutinePool-4 2 561435128 ns/op 1781150 ops/s 9592392 B/op 175009 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/100u-10Kt/BufferedPool-4 2 292584014 ns/op 3417822 ops/s 17594072 B/op 174993 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/100u-10Kt/Pond-4 2 1410644858 ns/op 708896 ops/s 339456280 B/op 8015325 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Ku-1Kt/VarMQ-4 2 357953207 ns/op 2793661 ops/s 114104708 B/op 1304343 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Ku-1Kt/Ants-4 2 435347180 ns/op 2297017 ops/s 6913160 B/op 88954 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Ku-1Kt/WorkerPool-4 2 632096903 ns/op 1582036 ops/s 1853448 B/op 25712 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Ku-1Kt/Conc-4 2 600531760 ns/op 1665191 ops/s 9616416 B/op 175866 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Ku-1Kt/ErrGroup-4 2 469495716 ns/op 2129945 ops/s 136068776 B/op 3001334 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Ku-1Kt/Gopool-4 2 621929013 ns/op 1607901 ops/s 65948852 B/op 1384170 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Ku-1Kt/GoroutinePool-4 2 539390820 ns/op 1853943 ops/s 9617328 B/op 175875 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Ku-1Kt/BufferedPool-4 2 288027032 ns/op 3471896 ops/s 17622032 B/op 175886 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Ku-1Kt/Pond-4 2 1493843667 ns/op 669414 ops/s 339647512 B/op 8012354 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/10Ku-100t/VarMQ-4 2 365839568 ns/op 2733439 ops/s 114093340 B/op 1315183 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/10Ku-100t/Ants-4 2 512473876 ns/op 1951319 ops/s 14481444 B/op 184814 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/10Ku-100t/WorkerPool-4 2 705583722 ns/op 1417266 ops/s 2188920 B/op 34451 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/10Ku-100t/Conc-4 2 690966440 ns/op 1447248 ops/s 9902288 B/op 184847 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/10Ku-100t/ErrGroup-4 2 489956790 ns/op 2040996 ops/s 136834288 B/op 3014597 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/10Ku-100t/Gopool-4 2 478179564 ns/op 2091265 ops/s 21976260 B/op 354751 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/10Ku-100t/GoroutinePool-4 2 492059466 ns/op 2032275 ops/s 9905608 B/op 184877 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/10Ku-100t/BufferedPool-4 2 332184569 ns/op 3010375 ops/s 17910648 B/op 184891 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/10Ku-100t/Pond-4 2 1314527341 ns/op 760730 ops/s 345312792 B/op 8003445 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Mu-1t/VarMQ-4 2 680381788 ns/op 1469763 ops/s 132340524 B/op 2222966 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Mu-1t/Ants-4 2 615919126 ns/op 1623590 ops/s 38806644 B/op 1085381 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Mu-1t/WorkerPool-4 2 972191452 ns/op 1028604 ops/s 64900232 B/op 1309867 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Mu-1t/Conc-4 2 735093740 ns/op 1360371 ops/s 41579320 B/op 1174821 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Mu-1t/ErrGroup-4 2 500231662 ns/op 1999074 ops/s 168033248 B/op 4000302 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Mu-1t/Gopool-4 2 533798425 ns/op 1873366 ops/s 105160668 B/op 2588645 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Mu-1t/GoroutinePool-4 2 665085852 ns/op 1503565 ops/s 41587624 B/op 1174895 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Mu-1t/BufferedPool-4 2 665324723 ns/op 1503025 ops/s 49596248 B/op 1174941 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Mu-1t/Pond-4 2 1660367068 ns/op 602276 ops/s 347281288 B/op 7385774 allocs/op +BenchmarkTasks/Sleep10msW100K/1u-1Mt/VarMQ-4 2 477226808 ns/op 2095440 ops/s 129714576 B/op 1572206 allocs/op +BenchmarkTasks/Sleep10msW100K/1u-1Mt/Ants-4 2 532598334 ns/op 1877588 ops/s 21737812 B/op 267386 allocs/op +BenchmarkTasks/Sleep10msW100K/1u-1Mt/WorkerPool-4 2 741042335 ns/op 1349451 ops/s 2946408 B/op 40118 allocs/op +BenchmarkTasks/Sleep10msW100K/1u-1Mt/Conc-4 2 615653419 ns/op 1624291 ops/s 19184168 B/op 349865 allocs/op +BenchmarkTasks/Sleep10msW100K/1u-1Mt/ErrGroup-4 2 437709402 ns/op 2284621 ops/s 136060608 B/op 3000547 allocs/op +BenchmarkTasks/Sleep10msW100K/1u-1Mt/Gopool-4 2 454007478 ns/op 2202607 ops/s 63952644 B/op 1477761 allocs/op +BenchmarkTasks/Sleep10msW100K/1u-1Mt/GoroutinePool-4 2 565158792 ns/op 1769414 ops/s 19566168 B/op 349912 allocs/op +BenchmarkTasks/Sleep10msW100K/1u-1Mt/BufferedPool-4 2 564754711 ns/op 1770680 ops/s 27191464 B/op 349899 allocs/op +BenchmarkTasks/Sleep10msW100K/1u-1Mt/Pond-4 2 1594343278 ns/op 627217 ops/s 344012832 B/op 8040465 allocs/op +BenchmarkTasks/Sleep10msW100K/100u-10Kt/VarMQ-4 2 450247241 ns/op 2221002 ops/s 126821576 B/op 1527667 allocs/op +BenchmarkTasks/Sleep10msW100K/100u-10Kt/Ants-4 2 455277532 ns/op 2196462 ops/s 13288692 B/op 167241 allocs/op +BenchmarkTasks/Sleep10msW100K/100u-10Kt/WorkerPool-4 2 643661877 ns/op 1553611 ops/s 3313992 B/op 44807 allocs/op +BenchmarkTasks/Sleep10msW100K/100u-10Kt/Conc-4 2 683709214 ns/op 1462610 ops/s 19188904 B/op 349978 allocs/op +BenchmarkTasks/Sleep10msW100K/100u-10Kt/ErrGroup-4 2 517261895 ns/op 1933257 ops/s 136092168 B/op 3000900 allocs/op +BenchmarkTasks/Sleep10msW100K/100u-10Kt/Gopool-4 2 550086936 ns/op 1817894 ops/s 72114696 B/op 1507528 allocs/op +BenchmarkTasks/Sleep10msW100K/100u-10Kt/GoroutinePool-4 2 624873104 ns/op 1600325 ops/s 19192112 B/op 350007 allocs/op +BenchmarkTasks/Sleep10msW100K/100u-10Kt/BufferedPool-4 2 347892948 ns/op 2874447 ops/s 27196144 B/op 350012 allocs/op +BenchmarkTasks/Sleep10msW100K/100u-10Kt/Pond-4 2 1503183861 ns/op 665255 ops/s 343457064 B/op 8035573 allocs/op +BenchmarkTasks/Sleep10msW100K/1Ku-1Kt/VarMQ-4 2 443542878 ns/op 2254573 ops/s 126101080 B/op 1510771 allocs/op +BenchmarkTasks/Sleep10msW100K/1Ku-1Kt/Ants-4 2 460604380 ns/op 2171061 ops/s 12400028 B/op 159200 allocs/op +BenchmarkTasks/Sleep10msW100K/1Ku-1Kt/WorkerPool-4 2 652983425 ns/op 1531432 ops/s 3564904 B/op 48852 allocs/op +BenchmarkTasks/Sleep10msW100K/1Ku-1Kt/Conc-4 2 660178593 ns/op 1514742 ops/s 19215184 B/op 350855 allocs/op +BenchmarkTasks/Sleep10msW100K/1Ku-1Kt/ErrGroup-4 2 503544636 ns/op 1985921 ops/s 136142976 B/op 3001996 allocs/op +BenchmarkTasks/Sleep10msW100K/1Ku-1Kt/Gopool-4 2 565280368 ns/op 1769034 ops/s 67536068 B/op 1419097 allocs/op +BenchmarkTasks/Sleep10msW100K/1Ku-1Kt/GoroutinePool-4 2 615709026 ns/op 1624144 ops/s 19218616 B/op 350886 allocs/op +BenchmarkTasks/Sleep10msW100K/1Ku-1Kt/BufferedPool-4 2 385459172 ns/op 2594308 ops/s 27218616 B/op 350855 allocs/op +BenchmarkTasks/Sleep10msW100K/1Ku-1Kt/Pond-4 2 1501827544 ns/op 665855 ops/s 342705112 B/op 8029502 allocs/op +BenchmarkTasks/Sleep10msW100K/10Ku-100t/VarMQ-4 2 447880134 ns/op 2232740 ops/s 129289424 B/op 1537220 allocs/op +BenchmarkTasks/Sleep10msW100K/10Ku-100t/Ants-4 2 537804949 ns/op 1859410 ops/s 18298808 B/op 234613 allocs/op +BenchmarkTasks/Sleep10msW100K/10Ku-100t/WorkerPool-4 2 713150434 ns/op 1402229 ops/s 3426128 B/op 52289 allocs/op +BenchmarkTasks/Sleep10msW100K/10Ku-100t/Conc-4 2 667653834 ns/op 1497782 ops/s 19504024 B/op 359863 allocs/op +BenchmarkTasks/Sleep10msW100K/10Ku-100t/ErrGroup-4 2 459314992 ns/op 2177155 ops/s 136786520 B/op 3014171 allocs/op +BenchmarkTasks/Sleep10msW100K/10Ku-100t/Gopool-4 2 629188726 ns/op 1589348 ops/s 68360716 B/op 1305566 allocs/op +BenchmarkTasks/Sleep10msW100K/10Ku-100t/GoroutinePool-4 2 566505664 ns/op 1765207 ops/s 19505496 B/op 359876 allocs/op +BenchmarkTasks/Sleep10msW100K/10Ku-100t/BufferedPool-4 2 385162860 ns/op 2596304 ops/s 27508576 B/op 359873 allocs/op +BenchmarkTasks/Sleep10msW100K/10Ku-100t/Pond-4 2 1652538912 ns/op 605129 ops/s 349286640 B/op 8063746 allocs/op +BenchmarkTasks/Sleep10msW100K/1Mu-1t/VarMQ-4 2 711116140 ns/op 1406240 ops/s 139382984 B/op 2323159 allocs/op +BenchmarkTasks/Sleep10msW100K/1Mu-1t/Ants-4 2 655230656 ns/op 1526180 ops/s 44272904 B/op 1155386 allocs/op +BenchmarkTasks/Sleep10msW100K/1Mu-1t/WorkerPool-4 2 998881803 ns/op 1001119 ops/s 64703000 B/op 1313329 allocs/op +BenchmarkTasks/Sleep10msW100K/1Mu-1t/Conc-4 2 757250546 ns/op 1320567 ops/s 51184864 B/op 1349870 allocs/op +BenchmarkTasks/Sleep10msW100K/1Mu-1t/ErrGroup-4 2 513328890 ns/op 1948069 ops/s 168004352 B/op 4000044 allocs/op +BenchmarkTasks/Sleep10msW100K/1Mu-1t/Gopool-4 2 540223903 ns/op 1851084 ops/s 108779100 B/op 2625275 allocs/op +BenchmarkTasks/Sleep10msW100K/1Mu-1t/GoroutinePool-4 2 701421941 ns/op 1425675 ops/s 51192944 B/op 1349943 allocs/op +BenchmarkTasks/Sleep10msW100K/1Mu-1t/BufferedPool-4 2 704533699 ns/op 1419379 ops/s 59188408 B/op 1349871 allocs/op +BenchmarkTasks/Sleep10msW100K/1Mu-1t/Pond-4 2 1750913208 ns/op 571131 ops/s 361058072 B/op 7596165 allocs/op +BenchmarkTasks/Loop10W100K/1u-1Mt/VarMQ-4 2 111671844 ns/op 8954809 ops/s 86225060 B/op 1003704 allocs/op +BenchmarkTasks/Loop10W100K/1u-1Mt/Ants-4 2 277734014 ns/op 3600567 ops/s 1167312 B/op 15847 allocs/op +BenchmarkTasks/Loop10W100K/1u-1Mt/WorkerPool-4 2 761894913 ns/op 1312517 ops/s 1128 B/op 22 allocs/op +BenchmarkTasks/Loop10W100K/1u-1Mt/Conc-4 2 456647201 ns/op 2189874 ops/s 9585120 B/op 249873 allocs/op +BenchmarkTasks/Loop10W100K/1u-1Mt/ErrGroup-4 2 280111947 ns/op 3570001 ops/s 40000296 B/op 2000009 allocs/op +BenchmarkTasks/Loop10W100K/1u-1Mt/Gopool-4 2 391863865 ns/op 2551907 ops/s 16177196 B/op 976329 allocs/op +BenchmarkTasks/Loop10W100K/1u-1Mt/GoroutinePool-4 2 372961288 ns/op 2681243 ops/s 9588608 B/op 249905 allocs/op +BenchmarkTasks/Loop10W100K/1u-1Mt/BufferedPool-4 2 360698122 ns/op 2772401 ops/s 17586984 B/op 249859 allocs/op +BenchmarkTasks/Loop10W100K/1u-1Mt/Pond-4 2 1146816984 ns/op 871979 ops/s 241011440 B/op 7001162 allocs/op +BenchmarkTasks/Loop10W100K/100u-10Kt/VarMQ-4 2 107130976 ns/op 9334368 ops/s 87190804 B/op 1009802 allocs/op +BenchmarkTasks/Loop10W100K/100u-10Kt/Ants-4 2 332120166 ns/op 3010958 ops/s 76240 B/op 1253 allocs/op +BenchmarkTasks/Loop10W100K/100u-10Kt/WorkerPool-4 2 435609150 ns/op 2295636 ops/s 10552 B/op 248 allocs/op +BenchmarkTasks/Loop10W100K/100u-10Kt/Conc-4 2 460201183 ns/op 2172963 ops/s 9597360 B/op 250053 allocs/op +BenchmarkTasks/Loop10W100K/100u-10Kt/ErrGroup-4 2 373330068 ns/op 2678595 ops/s 40003464 B/op 2000108 allocs/op +BenchmarkTasks/Loop10W100K/100u-10Kt/Gopool-4 2 413741912 ns/op 2416966 ops/s 12970868 B/op 698558 allocs/op +BenchmarkTasks/Loop10W100K/100u-10Kt/GoroutinePool-4 2 439676432 ns/op 2274400 ops/s 9594408 B/op 250027 allocs/op +BenchmarkTasks/Loop10W100K/100u-10Kt/BufferedPool-4 2 293116032 ns/op 3411618 ops/s 17591384 B/op 249969 allocs/op +BenchmarkTasks/Loop10W100K/100u-10Kt/Pond-4 2 1123644445 ns/op 889961 ops/s 240925312 B/op 7002397 allocs/op +BenchmarkTasks/Loop10W100K/1Ku-1Kt/VarMQ-4 2 106517132 ns/op 9388161 ops/s 87070732 B/op 1011665 allocs/op +BenchmarkTasks/Loop10W100K/1Ku-1Kt/Ants-4 2 352393870 ns/op 2837734 ops/s 476880 B/op 7663 allocs/op +BenchmarkTasks/Loop10W100K/1Ku-1Kt/WorkerPool-4 2 475471054 ns/op 2103177 ops/s 111016 B/op 2008 allocs/op +BenchmarkTasks/Loop10W100K/1Ku-1Kt/Conc-4 2 451547880 ns/op 2214605 ops/s 9635512 B/op 251037 allocs/op +BenchmarkTasks/Loop10W100K/1Ku-1Kt/ErrGroup-4 2 361892877 ns/op 2763249 ops/s 40033160 B/op 2001016 allocs/op +BenchmarkTasks/Loop10W100K/1Ku-1Kt/Gopool-4 2 350622093 ns/op 2852074 ops/s 5439780 B/op 304306 allocs/op +BenchmarkTasks/Loop10W100K/1Ku-1Kt/GoroutinePool-4 2 395043440 ns/op 2531367 ops/s 9666552 B/op 251314 allocs/op +BenchmarkTasks/Loop10W100K/1Ku-1Kt/BufferedPool-4 2 358151510 ns/op 2792114 ops/s 17620072 B/op 250868 allocs/op +BenchmarkTasks/Loop10W100K/1Ku-1Kt/Pond-4 2 1209735462 ns/op 826627 ops/s 243320832 B/op 7014759 allocs/op +BenchmarkTasks/Loop10W100K/10Ku-100t/VarMQ-4 2 112939784 ns/op 8854276 ops/s 87363452 B/op 1020660 allocs/op +BenchmarkTasks/Loop10W100K/10Ku-100t/Ants-4 2 360197896 ns/op 2776252 ops/s 4246936 B/op 62411 allocs/op +BenchmarkTasks/Loop10W100K/10Ku-100t/WorkerPool-4 2 516689469 ns/op 1935398 ops/s 984512 B/op 16834 allocs/op +BenchmarkTasks/Loop10W100K/10Ku-100t/Conc-4 2 427111597 ns/op 2341308 ops/s 10083448 B/op 261465 allocs/op +BenchmarkTasks/Loop10W100K/10Ku-100t/ErrGroup-4 2 321385344 ns/op 3111530 ops/s 40347872 B/op 2010254 allocs/op +BenchmarkTasks/Loop10W100K/10Ku-100t/Gopool-4 2 390608236 ns/op 2560110 ops/s 10277944 B/op 568128 allocs/op +BenchmarkTasks/Loop10W100K/10Ku-100t/GoroutinePool-4 2 351629502 ns/op 2843902 ops/s 10073328 B/op 261375 allocs/op +BenchmarkTasks/Loop10W100K/10Ku-100t/BufferedPool-4 2 387586696 ns/op 2580068 ops/s 17908744 B/op 259874 allocs/op +BenchmarkTasks/Loop10W100K/10Ku-100t/Pond-4 2 1291012658 ns/op 774586 ops/s 250855952 B/op 7055096 allocs/op +BenchmarkTasks/Loop10W100K/1Mu-1t/VarMQ-4 2 248773126 ns/op 4019727 ops/s 118172452 B/op 2003472 allocs/op +BenchmarkTasks/Loop10W100K/1Mu-1t/Ants-4 2 368879936 ns/op 2710909 ops/s 32218700 B/op 1003254 allocs/op +BenchmarkTasks/Loop10W100K/1Mu-1t/WorkerPool-4 2 743727947 ns/op 1344578 ops/s 63296872 B/op 1284349 allocs/op +BenchmarkTasks/Loop10W100K/1Mu-1t/Conc-4 2 625138314 ns/op 1599646 ops/s 41585648 B/op 1249877 allocs/op +BenchmarkTasks/Loop10W100K/1Mu-1t/ErrGroup-4 2 264604366 ns/op 3779227 ops/s 72000264 B/op 3000008 allocs/op +BenchmarkTasks/Loop10W100K/1Mu-1t/Gopool-4 2 405290288 ns/op 2467367 ops/s 47234444 B/op 1951267 allocs/op +BenchmarkTasks/Loop10W100K/1Mu-1t/GoroutinePool-4 2 503936458 ns/op 1984377 ops/s 41592720 B/op 1249941 allocs/op +BenchmarkTasks/Loop10W100K/1Mu-1t/BufferedPool-4 2 507618992 ns/op 1969981 ops/s 49591096 B/op 1249895 allocs/op +BenchmarkTasks/Loop10W100K/1Mu-1t/Pond-4 2 2265683328 ns/op 441368 ops/s 306239920 B/op 8243434 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1u-1Mt/VarMQ-4 2 383681868 ns/op 2606326 ops/s 118709132 B/op 1422011 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1u-1Mt/Ants-4 2 464577030 ns/op 2152496 ops/s 11024312 B/op 140023 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1u-1Mt/WorkerPool-4 2 731478160 ns/op 1367095 ops/s 1657968 B/op 22474 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1u-1Mt/Conc-4 2 600817406 ns/op 1664399 ops/s 19179800 B/op 349826 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1u-1Mt/ErrGroup-4 2 401421160 ns/op 2491149 ops/s 136000296 B/op 3000009 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1u-1Mt/Gopool-4 2 440708556 ns/op 2269073 ops/s 64430952 B/op 1480534 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1u-1Mt/GoroutinePool-4 2 539746440 ns/op 1852722 ops/s 19192528 B/op 349940 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1u-1Mt/BufferedPool-4 2 535970598 ns/op 1865774 ops/s 27186536 B/op 349855 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1u-1Mt/Pond-4 2 1421442122 ns/op 703511 ops/s 339322184 B/op 8014057 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/100u-10Kt/VarMQ-4 2 372364933 ns/op 2685538 ops/s 116800012 B/op 1383725 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/100u-10Kt/Ants-4 2 435525281 ns/op 2296078 ops/s 8753192 B/op 111413 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/100u-10Kt/WorkerPool-4 2 630321884 ns/op 1586491 ops/s 1779432 B/op 24173 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/100u-10Kt/Conc-4 2 667107594 ns/op 1499009 ops/s 19191648 B/op 350002 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/100u-10Kt/ErrGroup-4 2 513830872 ns/op 1946166 ops/s 136106560 B/op 3001028 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/100u-10Kt/Gopool-4 2 520802288 ns/op 1920114 ops/s 66072956 B/op 1418788 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/100u-10Kt/GoroutinePool-4 2 643387426 ns/op 1554273 ops/s 19190544 B/op 349993 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/100u-10Kt/BufferedPool-4 2 429410652 ns/op 2328773 ops/s 27194352 B/op 349996 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/100u-10Kt/Pond-4 2 1401360314 ns/op 713592 ops/s 339370096 B/op 8014556 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Ku-1Kt/VarMQ-4 2 377916747 ns/op 2646085 ops/s 115708108 B/op 1365467 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Ku-1Kt/Ants-4 2 432399599 ns/op 2312676 ops/s 7197996 B/op 92454 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Ku-1Kt/WorkerPool-4 2 613501696 ns/op 1629987 ops/s 2127688 B/op 29316 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Ku-1Kt/Conc-4 2 639684598 ns/op 1563270 ops/s 19221512 B/op 350912 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Ku-1Kt/ErrGroup-4 2 496269190 ns/op 2015035 ops/s 136107584 B/op 3001680 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Ku-1Kt/Gopool-4 2 682690832 ns/op 1464792 ops/s 76116036 B/op 1572725 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Ku-1Kt/GoroutinePool-4 2 620715375 ns/op 1611044 ops/s 19218000 B/op 350881 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Ku-1Kt/BufferedPool-4 2 401686808 ns/op 2489502 ops/s 27221360 B/op 350880 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Ku-1Kt/Pond-4 2 1435619532 ns/op 696563 ops/s 340424784 B/op 8015427 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/10Ku-100t/VarMQ-4 2 376152538 ns/op 2658496 ops/s 117806788 B/op 1370790 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/10Ku-100t/Ants-4 2 501782473 ns/op 1992895 ops/s 14510180 B/op 185890 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/10Ku-100t/WorkerPool-4 2 682072444 ns/op 1466120 ops/s 2369952 B/op 36906 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/10Ku-100t/Conc-4 2 657787858 ns/op 1520247 ops/s 19502960 B/op 359853 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/10Ku-100t/ErrGroup-4 2 452489458 ns/op 2209996 ops/s 136799792 B/op 3014289 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/10Ku-100t/Gopool-4 2 639273443 ns/op 1564276 ops/s 69202292 B/op 1336305 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/10Ku-100t/GoroutinePool-4 2 563330022 ns/op 1775158 ops/s 19500624 B/op 359833 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/10Ku-100t/BufferedPool-4 2 394805351 ns/op 2532894 ops/s 27507960 B/op 359867 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/10Ku-100t/Pond-4 2 1292313816 ns/op 773806 ops/s 348386776 B/op 8055711 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Mu-1t/VarMQ-4 2 671427046 ns/op 1489365 ops/s 132902864 B/op 2223530 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Mu-1t/Ants-4 2 597026190 ns/op 1674968 ops/s 38914304 B/op 1087226 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Mu-1t/WorkerPool-4 2 984858672 ns/op 1015374 ops/s 64408424 B/op 1306402 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Mu-1t/Conc-4 2 776071346 ns/op 1288541 ops/s 51180216 B/op 1349829 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Mu-1t/ErrGroup-4 2 490032112 ns/op 2040683 ops/s 168000264 B/op 4000008 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Mu-1t/Gopool-4 2 530819906 ns/op 1883878 ops/s 103551256 B/op 2569362 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Mu-1t/GoroutinePool-4 2 685500356 ns/op 1458788 ops/s 51191656 B/op 1349931 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Mu-1t/BufferedPool-4 2 683344776 ns/op 1463390 ops/s 59188856 B/op 1349875 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Mu-1t/Pond-4 2 1654095378 ns/op 604560 ops/s 363340144 B/op 7622569 allocs/op +BenchmarkTasks/Sleep10msW300K/1u-1Mt/VarMQ-4 2 505138975 ns/op 1979653 ops/s 116451332 B/op 1449797 allocs/op +BenchmarkTasks/Sleep10msW300K/1u-1Mt/Ants-4 2 509845925 ns/op 1961377 ops/s 21645092 B/op 265880 allocs/op +BenchmarkTasks/Sleep10msW300K/1u-1Mt/WorkerPool-4 2 695794530 ns/op 1437206 ops/s 3118952 B/op 42313 allocs/op +BenchmarkTasks/Sleep10msW300K/1u-1Mt/Conc-4 2 795134956 ns/op 1257648 ops/s 57587248 B/op 1049892 allocs/op +BenchmarkTasks/Sleep10msW300K/1u-1Mt/ErrGroup-4 2 431661952 ns/op 2316628 ops/s 136001360 B/op 3000018 allocs/op +BenchmarkTasks/Sleep10msW300K/1u-1Mt/Gopool-4 2 451381484 ns/op 2215421 ops/s 65017768 B/op 1492399 allocs/op +BenchmarkTasks/Sleep10msW300K/1u-1Mt/GoroutinePool-4 2 699973079 ns/op 1428626 ops/s 57589392 B/op 1049912 allocs/op +BenchmarkTasks/Sleep10msW300K/1u-1Mt/BufferedPool-4 2 639901766 ns/op 1562740 ops/s 65777248 B/op 1049876 allocs/op +BenchmarkTasks/Sleep10msW300K/1u-1Mt/Pond-4 2 1606969740 ns/op 622289 ops/s 342945584 B/op 8030936 allocs/op +BenchmarkTasks/Sleep10msW300K/100u-10Kt/VarMQ-4 2 483708762 ns/op 2067360 ops/s 114456900 B/op 1421166 allocs/op +BenchmarkTasks/Sleep10msW300K/100u-10Kt/Ants-4 2 442730507 ns/op 2258710 ops/s 13147768 B/op 164854 allocs/op +BenchmarkTasks/Sleep10msW300K/100u-10Kt/WorkerPool-4 2 638619880 ns/op 1565877 ops/s 3287816 B/op 44530 allocs/op +BenchmarkTasks/Sleep10msW300K/100u-10Kt/Conc-4 2 880153381 ns/op 1136166 ops/s 57576560 B/op 1049857 allocs/op +BenchmarkTasks/Sleep10msW300K/100u-10Kt/ErrGroup-4 2 552334238 ns/op 1810498 ops/s 136222480 B/op 3002063 allocs/op +BenchmarkTasks/Sleep10msW300K/100u-10Kt/Gopool-4 2 543816470 ns/op 1838856 ops/s 72210628 B/op 1492567 allocs/op +BenchmarkTasks/Sleep10msW300K/100u-10Kt/GoroutinePool-4 2 768940519 ns/op 1300491 ops/s 57594408 B/op 1050027 allocs/op +BenchmarkTasks/Sleep10msW300K/100u-10Kt/BufferedPool-4 2 533002846 ns/op 1876163 ops/s 65588480 B/op 1049943 allocs/op +BenchmarkTasks/Sleep10msW300K/100u-10Kt/Pond-4 2 1476493585 ns/op 677280 ops/s 343008336 B/op 8031567 allocs/op +BenchmarkTasks/Sleep10msW300K/1Ku-1Kt/VarMQ-4 2 481381430 ns/op 2077355 ops/s 115790156 B/op 1439061 allocs/op +BenchmarkTasks/Sleep10msW300K/1Ku-1Kt/Ants-4 2 461423982 ns/op 2167204 ops/s 12239964 B/op 155549 allocs/op +BenchmarkTasks/Sleep10msW300K/1Ku-1Kt/WorkerPool-4 2 624214911 ns/op 1602012 ops/s 3592800 B/op 49441 allocs/op +BenchmarkTasks/Sleep10msW300K/1Ku-1Kt/Conc-4 2 833036822 ns/op 1200427 ops/s 57552208 B/op 1050193 allocs/op +BenchmarkTasks/Sleep10msW300K/1Ku-1Kt/ErrGroup-4 2 523723340 ns/op 1909405 ops/s 136159496 B/op 3002144 allocs/op +BenchmarkTasks/Sleep10msW300K/1Ku-1Kt/Gopool-4 2 585951918 ns/op 1706625 ops/s 78496092 B/op 1689953 allocs/op +BenchmarkTasks/Sleep10msW300K/1Ku-1Kt/GoroutinePool-4 2 749625355 ns/op 1334000 ops/s 57615480 B/op 1050858 allocs/op +BenchmarkTasks/Sleep10msW300K/1Ku-1Kt/BufferedPool-4 2 591571386 ns/op 1690413 ops/s 65619680 B/op 1050865 allocs/op +BenchmarkTasks/Sleep10msW300K/1Ku-1Kt/Pond-4 2 1239451104 ns/op 806809 ops/s 342134192 B/op 8024405 allocs/op +BenchmarkTasks/Sleep10msW300K/10Ku-100t/VarMQ-4 2 483944790 ns/op 2066351 ops/s 118900284 B/op 1480086 allocs/op +BenchmarkTasks/Sleep10msW300K/10Ku-100t/Ants-4 2 514377398 ns/op 1944098 ops/s 18347904 B/op 236314 allocs/op +BenchmarkTasks/Sleep10msW300K/10Ku-100t/WorkerPool-4 2 706646640 ns/op 1415134 ops/s 3813544 B/op 57315 allocs/op +BenchmarkTasks/Sleep10msW300K/10Ku-100t/Conc-4 2 778052952 ns/op 1285260 ops/s 56833520 B/op 1048714 allocs/op +BenchmarkTasks/Sleep10msW300K/10Ku-100t/ErrGroup-4 2 468878293 ns/op 2132750 ops/s 136626920 B/op 3012746 allocs/op +BenchmarkTasks/Sleep10msW300K/10Ku-100t/Gopool-4 2 594745161 ns/op 1681392 ops/s 80708476 B/op 1657576 allocs/op +BenchmarkTasks/Sleep10msW300K/10Ku-100t/GoroutinePool-4 2 686318114 ns/op 1457050 ops/s 57903648 B/op 1059860 allocs/op +BenchmarkTasks/Sleep10msW300K/10Ku-100t/BufferedPool-4 2 597718806 ns/op 1673028 ops/s 65905552 B/op 1059846 allocs/op +BenchmarkTasks/Sleep10msW300K/10Ku-100t/Pond-4 2 1544769084 ns/op 647346 ops/s 349204656 B/op 8063014 allocs/op +BenchmarkTasks/Sleep10msW300K/1Mu-1t/VarMQ-4 2 720634931 ns/op 1387665 ops/s 140318920 B/op 2339816 allocs/op +BenchmarkTasks/Sleep10msW300K/1Mu-1t/Ants-4 2 653313741 ns/op 1530658 ops/s 44419792 B/op 1157875 allocs/op +BenchmarkTasks/Sleep10msW300K/1Mu-1t/WorkerPool-4 2 981101504 ns/op 1019263 ops/s 65760920 B/op 1323991 allocs/op +BenchmarkTasks/Sleep10msW300K/1Mu-1t/Conc-4 2 877671470 ns/op 1139378 ops/s 89578928 B/op 2049817 allocs/op +BenchmarkTasks/Sleep10msW300K/1Mu-1t/ErrGroup-4 2 516427130 ns/op 1936382 ops/s 168004912 B/op 4000049 allocs/op +BenchmarkTasks/Sleep10msW300K/1Mu-1t/Gopool-4 2 540173462 ns/op 1851257 ops/s 107862124 B/op 2621412 allocs/op +BenchmarkTasks/Sleep10msW300K/1Mu-1t/GoroutinePool-4 2 845952634 ns/op 1182099 ops/s 89587176 B/op 2049891 allocs/op +BenchmarkTasks/Sleep10msW300K/1Mu-1t/BufferedPool-4 2 806634928 ns/op 1239718 ops/s 97582864 B/op 2049822 allocs/op +BenchmarkTasks/Sleep10msW300K/1Mu-1t/Pond-4 2 2515803715 ns/op 397487 ops/s 486229136 B/op 9335889 allocs/op +BenchmarkTasks/Loop10W300K/1u-1Mt/VarMQ-4 2 113887342 ns/op 8780607 ops/s 86193428 B/op 1003692 allocs/op +BenchmarkTasks/Loop10W300K/1u-1Mt/Ants-4 2 277079508 ns/op 3609072 ops/s 483332 B/op 6888 allocs/op +BenchmarkTasks/Loop10W300K/1u-1Mt/WorkerPool-4 2 938432634 ns/op 1065607 ops/s 1128 B/op 22 allocs/op +BenchmarkTasks/Loop10W300K/1u-1Mt/Conc-4 2 636927828 ns/op 1570037 ops/s 28779296 B/op 749821 allocs/op +BenchmarkTasks/Loop10W300K/1u-1Mt/ErrGroup-4 2 276780650 ns/op 3612969 ops/s 40000296 B/op 2000009 allocs/op +BenchmarkTasks/Loop10W300K/1u-1Mt/Gopool-4 2 398159258 ns/op 2511558 ops/s 16707752 B/op 975346 allocs/op +BenchmarkTasks/Loop10W300K/1u-1Mt/GoroutinePool-4 2 490536388 ns/op 2038585 ops/s 28788440 B/op 749903 allocs/op +BenchmarkTasks/Loop10W300K/1u-1Mt/BufferedPool-4 2 452091464 ns/op 2211942 ops/s 36788944 B/op 749877 allocs/op +BenchmarkTasks/Loop10W300K/1u-1Mt/Pond-4 2 1118183642 ns/op 894307 ops/s 240487048 B/op 7000347 allocs/op +BenchmarkTasks/Loop10W300K/100u-10Kt/VarMQ-4 2 104473884 ns/op 9571770 ops/s 86856932 B/op 1008417 allocs/op +BenchmarkTasks/Loop10W300K/100u-10Kt/Ants-4 2 348124064 ns/op 2872539 ops/s 89652 B/op 1440 allocs/op +BenchmarkTasks/Loop10W300K/100u-10Kt/WorkerPool-4 2 428122267 ns/op 2335781 ops/s 11376 B/op 255 allocs/op +BenchmarkTasks/Loop10W300K/100u-10Kt/Conc-4 2 655741270 ns/op 1524992 ops/s 28787952 B/op 749969 allocs/op +BenchmarkTasks/Loop10W300K/100u-10Kt/ErrGroup-4 2 363856408 ns/op 2748337 ops/s 40003464 B/op 2000108 allocs/op +BenchmarkTasks/Loop10W300K/100u-10Kt/Gopool-4 2 409782306 ns/op 2440320 ops/s 10781844 B/op 663369 allocs/op +BenchmarkTasks/Loop10W300K/100u-10Kt/GoroutinePool-4 2 566032202 ns/op 1766684 ops/s 28797824 B/op 750058 allocs/op +BenchmarkTasks/Loop10W300K/100u-10Kt/BufferedPool-4 2 431823903 ns/op 2315759 ops/s 36794184 B/op 749994 allocs/op +BenchmarkTasks/Loop10W300K/100u-10Kt/Pond-4 2 1158816186 ns/op 862950 ops/s 241112056 B/op 7002614 allocs/op +BenchmarkTasks/Loop10W300K/1Ku-1Kt/VarMQ-4 2 111750269 ns/op 8948524 ops/s 87567548 B/op 1015652 allocs/op +BenchmarkTasks/Loop10W300K/1Ku-1Kt/Ants-4 2 347654038 ns/op 2876423 ops/s 513448 B/op 7875 allocs/op +BenchmarkTasks/Loop10W300K/1Ku-1Kt/WorkerPool-4 2 459219767 ns/op 2177607 ops/s 150280 B/op 2559 allocs/op +BenchmarkTasks/Loop10W300K/1Ku-1Kt/Conc-4 2 652071130 ns/op 1533575 ops/s 28815856 B/op 750861 allocs/op +BenchmarkTasks/Loop10W300K/1Ku-1Kt/ErrGroup-4 2 361702324 ns/op 2764704 ops/s 40035008 B/op 2001032 allocs/op +BenchmarkTasks/Loop10W300K/1Ku-1Kt/Gopool-4 2 380755036 ns/op 2626361 ops/s 8350168 B/op 491704 allocs/op +BenchmarkTasks/Loop10W300K/1Ku-1Kt/GoroutinePool-4 2 527999666 ns/op 1893941 ops/s 28852888 B/op 751192 allocs/op +BenchmarkTasks/Loop10W300K/1Ku-1Kt/BufferedPool-4 2 566267112 ns/op 1765951 ops/s 36814864 B/op 750822 allocs/op +BenchmarkTasks/Loop10W300K/1Ku-1Kt/Pond-4 2 1242730774 ns/op 804680 ops/s 243229664 B/op 7013701 allocs/op +BenchmarkTasks/Loop10W300K/10Ku-100t/VarMQ-4 2 111572918 ns/op 8962749 ops/s 87378716 B/op 1020603 allocs/op +BenchmarkTasks/Loop10W300K/10Ku-100t/Ants-4 2 385432675 ns/op 2594487 ops/s 4567316 B/op 66408 allocs/op +BenchmarkTasks/Loop10W300K/10Ku-100t/WorkerPool-4 2 542042198 ns/op 1844875 ops/s 1055072 B/op 17730 allocs/op +BenchmarkTasks/Loop10W300K/10Ku-100t/Conc-4 2 609225090 ns/op 1641429 ops/s 29103184 B/op 759855 allocs/op +BenchmarkTasks/Loop10W300K/10Ku-100t/ErrGroup-4 2 277673221 ns/op 3601356 ops/s 40324464 B/op 2010045 allocs/op +BenchmarkTasks/Loop10W300K/10Ku-100t/Gopool-4 2 340222794 ns/op 2939250 ops/s 7348920 B/op 350269 allocs/op +BenchmarkTasks/Loop10W300K/10Ku-100t/GoroutinePool-4 2 531582908 ns/op 1881174 ops/s 29102808 B/op 759852 allocs/op +BenchmarkTasks/Loop10W300K/10Ku-100t/BufferedPool-4 2 538973359 ns/op 1855379 ops/s 37112664 B/op 759909 allocs/op +BenchmarkTasks/Loop10W300K/10Ku-100t/Pond-4 2 1316587828 ns/op 759539 ops/s 252009448 B/op 7052342 allocs/op +BenchmarkTasks/Loop10W300K/1Mu-1t/VarMQ-4 2 252137080 ns/op 3966097 ops/s 118172636 B/op 2003374 allocs/op +BenchmarkTasks/Loop10W300K/1Mu-1t/Ants-4 2 368796786 ns/op 2711520 ops/s 32449208 B/op 1006376 allocs/op +BenchmarkTasks/Loop10W300K/1Mu-1t/WorkerPool-4 2 723125681 ns/op 1382885 ops/s 63583288 B/op 1287487 allocs/op +BenchmarkTasks/Loop10W300K/1Mu-1t/Conc-4 2 708438062 ns/op 1411556 ops/s 60785760 B/op 1749878 allocs/op +BenchmarkTasks/Loop10W300K/1Mu-1t/ErrGroup-4 2 257795272 ns/op 3879047 ops/s 72000264 B/op 3000008 allocs/op +BenchmarkTasks/Loop10W300K/1Mu-1t/Gopool-4 2 415750234 ns/op 2405290 ops/s 47151948 B/op 1944331 allocs/op +BenchmarkTasks/Loop10W300K/1Mu-1t/GoroutinePool-4 2 607630887 ns/op 1645736 ops/s 60787848 B/op 1749897 allocs/op +BenchmarkTasks/Loop10W300K/1Mu-1t/BufferedPool-4 2 590052096 ns/op 1694766 ops/s 68787176 B/op 1749860 allocs/op +BenchmarkTasks/Loop10W300K/1Mu-1t/Pond-4 2 2041402330 ns/op 489859 ops/s 311334600 B/op 8258225 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1u-1Mt/VarMQ-4 2 481287964 ns/op 2077758 ops/s 111551468 B/op 1368878 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1u-1Mt/Ants-4 2 465852836 ns/op 2146601 ops/s 11917256 B/op 152560 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1u-1Mt/WorkerPool-4 2 676763888 ns/op 1477620 ops/s 1728312 B/op 23558 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1u-1Mt/Conc-4 2 776701952 ns/op 1287495 ops/s 57584224 B/op 1049865 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1u-1Mt/ErrGroup-4 2 389622814 ns/op 2566585 ops/s 136000296 B/op 3000009 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1u-1Mt/Gopool-4 2 457698886 ns/op 2184843 ops/s 64992240 B/op 1484734 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1u-1Mt/GoroutinePool-4 2 659082602 ns/op 1517261 ops/s 57587824 B/op 1049898 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1u-1Mt/BufferedPool-4 2 630595308 ns/op 1585803 ops/s 65589448 B/op 1049881 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1u-1Mt/Pond-4 2 1422293390 ns/op 703090 ops/s 338757536 B/op 8009016 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/100u-10Kt/VarMQ-4 2 460496456 ns/op 2171569 ops/s 111474388 B/op 1359932 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/100u-10Kt/Ants-4 2 420934238 ns/op 2375668 ops/s 8700476 B/op 109685 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/100u-10Kt/WorkerPool-4 2 632606768 ns/op 1580761 ops/s 1791632 B/op 24329 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/100u-10Kt/Conc-4 2 844874707 ns/op 1183607 ops/s 57580816 B/op 1049900 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/100u-10Kt/ErrGroup-4 2 522294926 ns/op 1914627 ops/s 136003464 B/op 3000108 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/100u-10Kt/Gopool-4 2 503085185 ns/op 1987735 ops/s 66477584 B/op 1439262 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/100u-10Kt/GoroutinePool-4 2 770225604 ns/op 1298321 ops/s 57588584 B/op 1049975 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/100u-10Kt/BufferedPool-4 2 754978424 ns/op 1324541 ops/s 65591832 B/op 1049973 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/100u-10Kt/Pond-4 2 1343660430 ns/op 744236 ops/s 338537264 B/op 8007120 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Ku-1Kt/VarMQ-4 2 452506824 ns/op 2209911 ops/s 108882756 B/op 1315776 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Ku-1Kt/Ants-4 2 429248498 ns/op 2329653 ops/s 7197520 B/op 92383 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Ku-1Kt/WorkerPool-4 2 625082916 ns/op 1599788 ops/s 1966280 B/op 27103 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Ku-1Kt/Conc-4 2 812799379 ns/op 1230316 ops/s 57499280 B/op 1049637 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Ku-1Kt/ErrGroup-4 2 501886990 ns/op 1992480 ops/s 136058360 B/op 3001241 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Ku-1Kt/Gopool-4 2 684100604 ns/op 1461773 ops/s 87028028 B/op 1787208 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Ku-1Kt/GoroutinePool-4 2 749867464 ns/op 1333569 ops/s 57616376 B/op 1050866 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Ku-1Kt/BufferedPool-4 2 651599902 ns/op 1534684 ops/s 65621248 B/op 1050879 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Ku-1Kt/Pond-4 2 1444606537 ns/op 692230 ops/s 340091448 B/op 8012692 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/10Ku-100t/VarMQ-4 2 451032992 ns/op 2217133 ops/s 109701876 B/op 1329530 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/10Ku-100t/Ants-4 2 491412806 ns/op 2034949 ops/s 14599052 B/op 187624 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/10Ku-100t/WorkerPool-4 2 705302762 ns/op 1417831 ops/s 2348936 B/op 36199 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/10Ku-100t/Conc-4 2 780143092 ns/op 1281816 ops/s 56807856 B/op 1048449 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/10Ku-100t/ErrGroup-4 2 442265250 ns/op 2261087 ops/s 136611576 B/op 3012609 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/10Ku-100t/Gopool-4 2 654982690 ns/op 1526758 ops/s 91377116 B/op 1706569 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/10Ku-100t/GoroutinePool-4 2 699441518 ns/op 1429712 ops/s 57906448 B/op 1059885 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/10Ku-100t/BufferedPool-4 2 586858640 ns/op 1703988 ops/s 65911488 B/op 1059899 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/10Ku-100t/Pond-4 2 1578656709 ns/op 633450 ops/s 350513432 B/op 8074699 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Mu-1t/VarMQ-4 2 655660724 ns/op 1525179 ops/s 132329788 B/op 2219557 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Mu-1t/Ants-4 2 602174912 ns/op 1660647 ops/s 38891148 B/op 1086808 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Mu-1t/WorkerPool-4 2 966783109 ns/op 1034358 ops/s 64603376 B/op 1305662 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Mu-1t/Conc-4 2 881047110 ns/op 1135013 ops/s 89584304 B/op 2049865 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Mu-1t/ErrGroup-4 2 474480206 ns/op 2107569 ops/s 168000264 B/op 4000008 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Mu-1t/Gopool-4 2 530895489 ns/op 1883610 ops/s 104416836 B/op 2577177 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Mu-1t/GoroutinePool-4 2 809246149 ns/op 1235718 ops/s 89596752 B/op 2049977 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Mu-1t/BufferedPool-4 2 798614991 ns/op 1252168 ops/s 97585944 B/op 2049849 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Mu-1t/Pond-4 2 2585484254 ns/op 386775 ops/s 446015272 B/op 9412370 allocs/op +BenchmarkTasks/Loop10W1/1u-1Mt/VarMQ-4 2 149976504 ns/op 6667711 ops/s 86091364 B/op 1002979 allocs/op +BenchmarkTasks/Loop10W1/1u-1Mt/Ants-4 2 585066297 ns/op 1709208 ops/s 2308 B/op 37 allocs/op +BenchmarkTasks/Loop10W1/1u-1Mt/WorkerPool-4 2 508714574 ns/op 1965739 ops/s 8367240 B/op 2519 allocs/op +BenchmarkTasks/Loop10W1/1u-1Mt/Conc-4 2 366088065 ns/op 2731583 ops/s 448 B/op 12 allocs/op +BenchmarkTasks/Loop10W1/1u-1Mt/ErrGroup-4 2 492992728 ns/op 2028427 ops/s 40000296 B/op 2000009 allocs/op +BenchmarkTasks/Loop10W1/1u-1Mt/Gopool-4 2 77022489 ns/op 12983221 ops/s 7431612 B/op 84602 allocs/op +BenchmarkTasks/Loop10W1/1u-1Mt/GoroutinePool-4 2 184724454 ns/op 5413468 ops/s 296 B/op 11 allocs/op +BenchmarkTasks/Loop10W1/1u-1Mt/BufferedPool-4 2 37366627 ns/op 26761848 ops/s 8003880 B/op 12 allocs/op +BenchmarkTasks/Loop10W1/1u-1Mt/Pond-4 2 373272602 ns/op 2679007 ops/s 280667184 B/op 6004137 allocs/op +BenchmarkTasks/Loop10W1/100u-10Kt/VarMQ-4 2 134997812 ns/op 7407527 ops/s 86162356 B/op 1003087 allocs/op +BenchmarkTasks/Loop10W1/100u-10Kt/Ants-4 2 455293564 ns/op 2196385 ops/s 5476 B/op 136 allocs/op +BenchmarkTasks/Loop10W1/100u-10Kt/WorkerPool-4 2 738582540 ns/op 1353945 ops/s 25178952 B/op 153 allocs/op +BenchmarkTasks/Loop10W1/100u-10Kt/Conc-4 2 362451799 ns/op 2758988 ops/s 9944 B/op 167 allocs/op +BenchmarkTasks/Loop10W1/100u-10Kt/ErrGroup-4 2 311349750 ns/op 3211822 ops/s 40003464 B/op 2000108 allocs/op +BenchmarkTasks/Loop10W1/100u-10Kt/Gopool-4 2 206112816 ns/op 4851712 ops/s 32541812 B/op 492147 allocs/op +BenchmarkTasks/Loop10W1/100u-10Kt/GoroutinePool-4 2 176949672 ns/op 5651324 ops/s 3912 B/op 114 allocs/op +BenchmarkTasks/Loop10W1/100u-10Kt/BufferedPool-4 2 35553222 ns/op 28126846 ops/s 8007048 B/op 111 allocs/op +BenchmarkTasks/Loop10W1/100u-10Kt/Pond-4 2 572754090 ns/op 1745950 ops/s 336101968 B/op 6008317 allocs/op +BenchmarkTasks/Loop10W1/1Ku-1Kt/VarMQ-4 2 136122936 ns/op 7346301 ops/s 86134636 B/op 1003979 allocs/op +BenchmarkTasks/Loop10W1/1Ku-1Kt/Ants-4 2 491602456 ns/op 2034164 ops/s 77788 B/op 1424 allocs/op +BenchmarkTasks/Loop10W1/1Ku-1Kt/WorkerPool-4 2 496527711 ns/op 2013986 ops/s 25265152 B/op 1565 allocs/op +BenchmarkTasks/Loop10W1/1Ku-1Kt/Conc-4 2 386150176 ns/op 2589666 ops/s 128232 B/op 1866 allocs/op +BenchmarkTasks/Loop10W1/1Ku-1Kt/ErrGroup-4 2 411873049 ns/op 2427933 ops/s 40076448 B/op 2001402 allocs/op +BenchmarkTasks/Loop10W1/1Ku-1Kt/Gopool-4 2 210147076 ns/op 4758572 ops/s 32834932 B/op 500266 allocs/op +BenchmarkTasks/Loop10W1/1Ku-1Kt/GoroutinePool-4 2 252328807 ns/op 3963083 ops/s 74768 B/op 1389 allocs/op +BenchmarkTasks/Loop10W1/1Ku-1Kt/BufferedPool-4 2 35720584 ns/op 27995063 ops/s 8035848 B/op 1011 allocs/op +BenchmarkTasks/Loop10W1/1Ku-1Kt/Pond-4 2 586826442 ns/op 1704081 ops/s 336968696 B/op 6009930 allocs/op +BenchmarkTasks/Loop10W1/10Ku-100t/VarMQ-4 2 136142406 ns/op 7345250 ops/s 86411332 B/op 1012978 allocs/op +BenchmarkTasks/Loop10W1/10Ku-100t/Ants-4 2 1027183186 ns/op 973536 ops/s 862060 B/op 14855 allocs/op +BenchmarkTasks/Loop10W1/10Ku-100t/WorkerPool-4 2 607275332 ns/op 1646700 ops/s 26047456 B/op 14979 allocs/op +BenchmarkTasks/Loop10W1/10Ku-100t/Conc-4 2 419106975 ns/op 2386026 ops/s 1424848 B/op 19872 allocs/op +BenchmarkTasks/Loop10W1/10Ku-100t/ErrGroup-4 2 610060748 ns/op 1639181 ops/s 40866488 B/op 2014885 allocs/op +BenchmarkTasks/Loop10W1/10Ku-100t/Gopool-4 2 204484711 ns/op 4890341 ops/s 33563280 B/op 513637 allocs/op +BenchmarkTasks/Loop10W1/10Ku-100t/GoroutinePool-4 2 283377899 ns/op 3528857 ops/s 863800 B/op 14863 allocs/op +BenchmarkTasks/Loop10W1/10Ku-100t/BufferedPool-4 2 40083236 ns/op 24948085 ops/s 8323848 B/op 10011 allocs/op +BenchmarkTasks/Loop10W1/10Ku-100t/Pond-4 2 602763299 ns/op 1659026 ops/s 338041608 B/op 6026905 allocs/op +BenchmarkTasks/Loop10W1/1Mu-1t/VarMQ-4 2 230735494 ns/op 4333967 ops/s 118362772 B/op 2003015 allocs/op +BenchmarkTasks/Loop10W1/1Mu-1t/Ants-4 2 1080174736 ns/op 925776 ops/s 74304564 B/op 1377735 allocs/op +BenchmarkTasks/Loop10W1/1Mu-1t/WorkerPool-4 2 700727422 ns/op 1427088 ops/s 77999632 B/op 1185980 allocs/op +BenchmarkTasks/Loop10W1/1Mu-1t/Conc-4 2 647780073 ns/op 1543734 ops/s 34023136 B/op 1018071 allocs/op +BenchmarkTasks/Loop10W1/1Mu-1t/ErrGroup-4 2 719341228 ns/op 1390161 ops/s 112498008 B/op 3361595 allocs/op +BenchmarkTasks/Loop10W1/1Mu-1t/Gopool-4 2 257140153 ns/op 3888930 ops/s 32832624 B/op 1025027 allocs/op +BenchmarkTasks/Loop10W1/1Mu-1t/GoroutinePool-4 2 410127517 ns/op 2438266 ops/s 53475984 B/op 1191757 allocs/op +BenchmarkTasks/Loop10W1/1Mu-1t/BufferedPool-4 2 213544058 ns/op 4682874 ops/s 40003848 B/op 1000011 allocs/op +BenchmarkTasks/Loop10W1/1Mu-1t/Pond-4 2 655415821 ns/op 1525749 ops/s 315420888 B/op 7018656 allocs/op +BenchmarkTasks/Loop10KW1/1u-1Mt/VarMQ-4 2 1124713781 ns/op 889115 ops/s 86091364 B/op 1002979 allocs/op +BenchmarkTasks/Loop10KW1/1u-1Mt/Ants-4 2 1675162712 ns/op 596957 ops/s 2308 B/op 37 allocs/op +BenchmarkTasks/Loop10KW1/1u-1Mt/WorkerPool-4 2 2745141333 ns/op 364280 ops/s 25175552 B/op 52 allocs/op +BenchmarkTasks/Loop10KW1/1u-1Mt/Conc-4 2 1777339811 ns/op 562639 ops/s 448 B/op 12 allocs/op +BenchmarkTasks/Loop10KW1/1u-1Mt/ErrGroup-4 2 1956946186 ns/op 511000 ops/s 40000296 B/op 2000009 allocs/op +BenchmarkTasks/Loop10KW1/1u-1Mt/Gopool-4 2 1018091592 ns/op 982230 ops/s 32379280 B/op 487425 allocs/op +BenchmarkTasks/Loop10KW1/1u-1Mt/GoroutinePool-4 2 1851049058 ns/op 540234 ops/s 296 B/op 11 allocs/op +BenchmarkTasks/Loop10KW1/1u-1Mt/BufferedPool-4 2 1016256138 ns/op 984004 ops/s 8003880 B/op 12 allocs/op +BenchmarkTasks/Loop10KW1/1u-1Mt/Pond-4 2 1364231535 ns/op 733013 ops/s 290020800 B/op 6004821 allocs/op +BenchmarkTasks/Loop10KW1/100u-10Kt/VarMQ-4 2 1109079552 ns/op 901649 ops/s 86139748 B/op 1003084 allocs/op +BenchmarkTasks/Loop10KW1/100u-10Kt/Ants-4 2 1637125069 ns/op 610827 ops/s 5532 B/op 136 allocs/op +BenchmarkTasks/Loop10KW1/100u-10Kt/WorkerPool-4 2 2112001614 ns/op 473484 ops/s 25179904 B/op 161 allocs/op +BenchmarkTasks/Loop10KW1/100u-10Kt/Conc-4 2 1336109740 ns/op 748442 ops/s 6472 B/op 136 allocs/op +BenchmarkTasks/Loop10KW1/100u-10Kt/ErrGroup-4 2 1942918012 ns/op 514690 ops/s 40003464 B/op 2000108 allocs/op +BenchmarkTasks/Loop10KW1/100u-10Kt/Gopool-4 2 1175869314 ns/op 850435 ops/s 32699616 B/op 497369 allocs/op +BenchmarkTasks/Loop10KW1/100u-10Kt/GoroutinePool-4 2 1248864239 ns/op 800728 ops/s 4864 B/op 122 allocs/op +BenchmarkTasks/Loop10KW1/100u-10Kt/BufferedPool-4 2 1022625456 ns/op 977875 ops/s 8007048 B/op 111 allocs/op +BenchmarkTasks/Loop10KW1/100u-10Kt/Pond-4 2 1527317276 ns/op 654743 ops/s 336648560 B/op 6008363 allocs/op +BenchmarkTasks/Loop10KW1/1Ku-1Kt/VarMQ-4 2 1111332742 ns/op 899821 ops/s 86134636 B/op 1003979 allocs/op +BenchmarkTasks/Loop10KW1/1Ku-1Kt/Ants-4 2 1884799584 ns/op 530560 ops/s 78852 B/op 1434 allocs/op +BenchmarkTasks/Loop10KW1/1Ku-1Kt/WorkerPool-4 2 2166735338 ns/op 461524 ops/s 25265376 B/op 1567 allocs/op +BenchmarkTasks/Loop10KW1/1Ku-1Kt/Conc-4 2 1286345418 ns/op 777396 ops/s 130024 B/op 1882 allocs/op +BenchmarkTasks/Loop10KW1/1Ku-1Kt/ErrGroup-4 2 1876736021 ns/op 532840 ops/s 40076504 B/op 2001403 allocs/op +BenchmarkTasks/Loop10KW1/1Ku-1Kt/Gopool-4 2 1186441346 ns/op 842857 ops/s 32852980 B/op 501092 allocs/op +BenchmarkTasks/Loop10KW1/1Ku-1Kt/GoroutinePool-4 2 1231098912 ns/op 812282 ops/s 74152 B/op 1384 allocs/op +BenchmarkTasks/Loop10KW1/1Ku-1Kt/BufferedPool-4 2 1019516912 ns/op 980857 ops/s 8035848 B/op 1011 allocs/op +BenchmarkTasks/Loop10KW1/1Ku-1Kt/Pond-4 2 1561864361 ns/op 640260 ops/s 337063856 B/op 6010055 allocs/op +BenchmarkTasks/Loop10KW1/10Ku-100t/VarMQ-4 2 1106472536 ns/op 903773 ops/s 86411332 B/op 1012978 allocs/op +BenchmarkTasks/Loop10KW1/10Ku-100t/Ants-4 2 2430871940 ns/op 411375 ops/s 863852 B/op 14871 allocs/op +BenchmarkTasks/Loop10KW1/10Ku-100t/WorkerPool-4 2 1845543288 ns/op 541846 ops/s 26045840 B/op 14964 allocs/op +BenchmarkTasks/Loop10KW1/10Ku-100t/Conc-4 2 1358328454 ns/op 736199 ops/s 1428544 B/op 19905 allocs/op +BenchmarkTasks/Loop10KW1/10Ku-100t/ErrGroup-4 2 2070730893 ns/op 482921 ops/s 40866376 B/op 2014884 allocs/op +BenchmarkTasks/Loop10KW1/10Ku-100t/Gopool-4 2 1184736936 ns/op 844069 ops/s 33622220 B/op 512148 allocs/op +BenchmarkTasks/Loop10KW1/10Ku-100t/GoroutinePool-4 2 1243029230 ns/op 804486 ops/s 867832 B/op 14899 allocs/op +BenchmarkTasks/Loop10KW1/10Ku-100t/BufferedPool-4 2 1019150790 ns/op 981209 ops/s 8323848 B/op 10011 allocs/op +BenchmarkTasks/Loop10KW1/10Ku-100t/Pond-4 2 1582191055 ns/op 632035 ops/s 338237472 B/op 6027204 allocs/op +BenchmarkTasks/Loop10KW1/1Mu-1t/VarMQ-4 2 1139587542 ns/op 877510 ops/s 118114604 B/op 2002983 allocs/op +BenchmarkTasks/Loop10KW1/1Mu-1t/Ants-4 2 2037371359 ns/op 490829 ops/s 84647324 B/op 1438702 allocs/op +BenchmarkTasks/Loop10KW1/1Mu-1t/WorkerPool-4 2 1899700499 ns/op 526399 ops/s 79456864 B/op 1198991 allocs/op +BenchmarkTasks/Loop10KW1/1Mu-1t/Conc-4 2 1613190109 ns/op 619890 ops/s 127735104 B/op 1854785 allocs/op +BenchmarkTasks/Loop10KW1/1Mu-1t/ErrGroup-4 2 2441459524 ns/op 409591 ops/s 128686456 B/op 3458298 allocs/op +BenchmarkTasks/Loop10KW1/1Mu-1t/Gopool-4 2 1057000960 ns/op 946073 ops/s 62623764 B/op 1429851 allocs/op +BenchmarkTasks/Loop10KW1/1Mu-1t/GoroutinePool-4 2 1378069101 ns/op 725653 ops/s 80253392 B/op 1430841 allocs/op +BenchmarkTasks/Loop10KW1/1Mu-1t/BufferedPool-4 2 1049681844 ns/op 952670 ops/s 40003848 B/op 1000011 allocs/op +BenchmarkTasks/Loop10KW1/1Mu-1t/Pond-4 2 1567978072 ns/op 637764 ops/s 338237088 B/op 7018844 allocs/op +PASS +ok github.com/goptics/benchmarks/pool 711.582s diff --git a/pool/bench/pool-8cpu.txt b/pool/bench/pool-8cpu.txt new file mode 100644 index 0000000..793b863 --- /dev/null +++ b/pool/bench/pool-8cpu.txt @@ -0,0 +1,501 @@ +goos: linux +goarch: amd64 +pkg: github.com/goptics/benchmarks/pool +cpu: 13th Gen Intel(R) Core(TM) i7-13700 +BenchmarkTasks/Sleep10msW50K/1u-1Mt/VarMQ-8 2 313037930 ns/op 3194501 ops/s 137985484 B/op 1474967 allocs/op +BenchmarkTasks/Sleep10msW50K/1u-1Mt/Ants-8 2 485461464 ns/op 2059896 ops/s 25015112 B/op 299667 allocs/op +BenchmarkTasks/Sleep10msW50K/1u-1Mt/WorkerPool-8 2 1549080828 ns/op 645544 ops/s 2824208 B/op 38549 allocs/op +BenchmarkTasks/Sleep10msW50K/1u-1Mt/Conc-8 2 529174774 ns/op 1889735 ops/s 9599504 B/op 174790 allocs/op +BenchmarkTasks/Sleep10msW50K/1u-1Mt/ErrGroup-8 2 387315796 ns/op 2581872 ops/s 136874120 B/op 3007811 allocs/op +BenchmarkTasks/Sleep10msW50K/1u-1Mt/Gopool-8 2 546235542 ns/op 1830712 ops/s 79646244 B/op 1627090 allocs/op +BenchmarkTasks/Sleep10msW50K/1u-1Mt/GoroutinePool-8 2 492397530 ns/op 2030879 ops/s 9598400 B/op 174849 allocs/op +BenchmarkTasks/Sleep10msW50K/1u-1Mt/BufferedPool-8 2 261861912 ns/op 3818807 ops/s 20353584 B/op 199431 allocs/op +BenchmarkTasks/Sleep10msW50K/1u-1Mt/Pond-8 2 1469620890 ns/op 680448 ops/s 361081312 B/op 8192862 allocs/op +BenchmarkTasks/Sleep10msW50K/100u-10Kt/VarMQ-8 2 311694872 ns/op 3208266 ops/s 122575344 B/op 1414200 allocs/op +BenchmarkTasks/Sleep10msW50K/100u-10Kt/Ants-8 2 432416306 ns/op 2312586 ops/s 12365092 B/op 157789 allocs/op +BenchmarkTasks/Sleep10msW50K/100u-10Kt/WorkerPool-8 2 656800727 ns/op 1522532 ops/s 3485920 B/op 47180 allocs/op +BenchmarkTasks/Sleep10msW50K/100u-10Kt/Conc-8 2 557870540 ns/op 1792531 ops/s 11466416 B/op 191741 allocs/op +BenchmarkTasks/Sleep10msW50K/100u-10Kt/ErrGroup-8 2 401942428 ns/op 2487918 ops/s 136938048 B/op 3008452 allocs/op +BenchmarkTasks/Sleep10msW50K/100u-10Kt/Gopool-8 2 576546608 ns/op 1734465 ops/s 72038056 B/op 1492469 allocs/op +BenchmarkTasks/Sleep10msW50K/100u-10Kt/GoroutinePool-8 2 474509994 ns/op 2107437 ops/s 9608064 B/op 175018 allocs/op +BenchmarkTasks/Sleep10msW50K/100u-10Kt/BufferedPool-8 2 265187252 ns/op 3770920 ops/s 21686016 B/op 200697 allocs/op +BenchmarkTasks/Sleep10msW50K/100u-10Kt/Pond-8 2 1424999102 ns/op 701755 ops/s 362869912 B/op 8208902 allocs/op +BenchmarkTasks/Sleep10msW50K/1Ku-1Kt/VarMQ-8 2 316560466 ns/op 3158954 ops/s 121433928 B/op 1400712 allocs/op +BenchmarkTasks/Sleep10msW50K/1Ku-1Kt/Ants-8 2 438562488 ns/op 2280177 ops/s 12594296 B/op 160814 allocs/op +BenchmarkTasks/Sleep10msW50K/1Ku-1Kt/WorkerPool-8 2 590412000 ns/op 1693733 ops/s 3530608 B/op 48625 allocs/op +BenchmarkTasks/Sleep10msW50K/1Ku-1Kt/Conc-8 2 662601278 ns/op 1509203 ops/s 9601016 B/op 175729 allocs/op +BenchmarkTasks/Sleep10msW50K/1Ku-1Kt/ErrGroup-8 2 446022973 ns/op 2242037 ops/s 136865264 B/op 3008445 allocs/op +BenchmarkTasks/Sleep10msW50K/1Ku-1Kt/Gopool-8 2 629902300 ns/op 1587548 ops/s 75632872 B/op 1559167 allocs/op +BenchmarkTasks/Sleep10msW50K/1Ku-1Kt/GoroutinePool-8 2 505997019 ns/op 1976296 ops/s 9606408 B/op 175777 allocs/op +BenchmarkTasks/Sleep10msW50K/1Ku-1Kt/BufferedPool-8 2 270139462 ns/op 3701792 ops/s 20361720 B/op 200347 allocs/op +BenchmarkTasks/Sleep10msW50K/1Ku-1Kt/Pond-8 2 1436354492 ns/op 696207 ops/s 347404128 B/op 8071458 allocs/op +BenchmarkTasks/Sleep10msW50K/10Ku-100t/VarMQ-8 2 324436082 ns/op 3082271 ops/s 121225580 B/op 1395996 allocs/op +BenchmarkTasks/Sleep10msW50K/10Ku-100t/Ants-8 2 474064120 ns/op 2109419 ops/s 16348064 B/op 214023 allocs/op +BenchmarkTasks/Sleep10msW50K/10Ku-100t/WorkerPool-8 2 683134022 ns/op 1463842 ops/s 4324336 B/op 63457 allocs/op +BenchmarkTasks/Sleep10msW50K/10Ku-100t/Conc-8 2 870629160 ns/op 1148595 ops/s 14040184 B/op 209971 allocs/op +BenchmarkTasks/Sleep10msW50K/10Ku-100t/ErrGroup-8 2 531822975 ns/op 1880325 ops/s 137455272 B/op 3020142 allocs/op +BenchmarkTasks/Sleep10msW50K/10Ku-100t/Gopool-8 2 454502426 ns/op 2200208 ops/s 26415396 B/op 393217 allocs/op +BenchmarkTasks/Sleep10msW50K/10Ku-100t/GoroutinePool-8 2 490398334 ns/op 2039159 ops/s 9910080 B/op 184809 allocs/op +BenchmarkTasks/Sleep10msW50K/10Ku-100t/BufferedPool-8 2 278215981 ns/op 3594330 ops/s 20741208 B/op 207049 allocs/op +BenchmarkTasks/Sleep10msW50K/10Ku-100t/Pond-8 2 1038178892 ns/op 963225 ops/s 298448880 B/op 7058129 allocs/op +BenchmarkTasks/Sleep10msW50K/1Mu-1t/VarMQ-8 2 377867961 ns/op 2646427 ops/s 146698660 B/op 2361108 allocs/op +BenchmarkTasks/Sleep10msW50K/1Mu-1t/Ants-8 2 601433274 ns/op 1662695 ops/s 47573096 B/op 1185082 allocs/op +BenchmarkTasks/Sleep10msW50K/1Mu-1t/WorkerPool-8 2 910007742 ns/op 1098892 ops/s 261910904 B/op 1792762 allocs/op +BenchmarkTasks/Sleep10msW50K/1Mu-1t/Conc-8 2 685542822 ns/op 1458698 ops/s 41569408 B/op 1174732 allocs/op +BenchmarkTasks/Sleep10msW50K/1Mu-1t/ErrGroup-8 2 378063225 ns/op 2645060 ops/s 168000264 B/op 4000008 allocs/op +BenchmarkTasks/Sleep10msW50K/1Mu-1t/Gopool-8 2 620666126 ns/op 1611172 ops/s 84501620 B/op 1881910 allocs/op +BenchmarkTasks/Sleep10msW50K/1Mu-1t/GoroutinePool-8 2 620107859 ns/op 1612623 ops/s 41573792 B/op 1174772 allocs/op +BenchmarkTasks/Sleep10msW50K/1Mu-1t/BufferedPool-8 2 632820444 ns/op 1580227 ops/s 49584544 B/op 1174837 allocs/op +BenchmarkTasks/Sleep10msW50K/1Mu-1t/Pond-8 2 1766770697 ns/op 566004 ops/s 348630776 B/op 7392147 allocs/op +BenchmarkTasks/Loop10W50K/1u-1Mt/VarMQ-8 2 134042989 ns/op 7460293 ops/s 86230060 B/op 1003920 allocs/op +BenchmarkTasks/Loop10W50K/1u-1Mt/Ants-8 2 310973194 ns/op 3215711 ops/s 233720 B/op 3449 allocs/op +BenchmarkTasks/Loop10W50K/1u-1Mt/WorkerPool-8 2 808613901 ns/op 1236684 ops/s 1128 B/op 22 allocs/op +BenchmarkTasks/Loop10W50K/1u-1Mt/Conc-8 2 449643140 ns/op 2223986 ops/s 4763448 B/op 124680 allocs/op +BenchmarkTasks/Loop10W50K/1u-1Mt/ErrGroup-8 2 303831486 ns/op 3291298 ops/s 40000296 B/op 2000009 allocs/op +BenchmarkTasks/Loop10W50K/1u-1Mt/Gopool-8 2 479591140 ns/op 2085109 ops/s 15889588 B/op 983543 allocs/op +BenchmarkTasks/Loop10W50K/1u-1Mt/GoroutinePool-8 2 404916212 ns/op 2469647 ops/s 4783624 B/op 124860 allocs/op +BenchmarkTasks/Loop10W50K/1u-1Mt/BufferedPool-8 2 370653844 ns/op 2697935 ops/s 12772536 B/op 124730 allocs/op +BenchmarkTasks/Loop10W50K/1u-1Mt/Pond-8 2 1193675046 ns/op 837749 ops/s 240691560 B/op 7002173 allocs/op +BenchmarkTasks/Loop10W50K/100u-10Kt/VarMQ-8 2 96506722 ns/op 10361973 ops/s 86568060 B/op 1006061 allocs/op +BenchmarkTasks/Loop10W50K/100u-10Kt/Ants-8 2 359107182 ns/op 2784684 ops/s 102176 B/op 1611 allocs/op +BenchmarkTasks/Loop10W50K/100u-10Kt/WorkerPool-8 2 453876478 ns/op 2203243 ops/s 7464 B/op 220 allocs/op +BenchmarkTasks/Loop10W50K/100u-10Kt/Conc-8 2 418632700 ns/op 2388729 ops/s 4782016 B/op 124916 allocs/op +BenchmarkTasks/Loop10W50K/100u-10Kt/ErrGroup-8 2 396293384 ns/op 2523383 ops/s 40003464 B/op 2000108 allocs/op +BenchmarkTasks/Loop10W50K/100u-10Kt/Gopool-8 2 454734447 ns/op 2199086 ops/s 10306228 B/op 606492 allocs/op +BenchmarkTasks/Loop10W50K/100u-10Kt/GoroutinePool-8 2 397426345 ns/op 2516190 ops/s 4785112 B/op 124944 allocs/op +BenchmarkTasks/Loop10W50K/100u-10Kt/BufferedPool-8 2 248650314 ns/op 4021712 ops/s 12784160 B/op 124905 allocs/op +BenchmarkTasks/Loop10W50K/100u-10Kt/Pond-8 2 1261829292 ns/op 792500 ops/s 242645400 B/op 7008085 allocs/op +BenchmarkTasks/Loop10W50K/1Ku-1Kt/VarMQ-8 2 101519724 ns/op 9850303 ops/s 87329252 B/op 1013279 allocs/op +BenchmarkTasks/Loop10W50K/1Ku-1Kt/Ants-8 2 361956279 ns/op 2762765 ops/s 593996 B/op 9013 allocs/op +BenchmarkTasks/Loop10W50K/1Ku-1Kt/WorkerPool-8 2 485776726 ns/op 2058559 ops/s 132424 B/op 2372 allocs/op +BenchmarkTasks/Loop10W50K/1Ku-1Kt/Conc-8 2 399554082 ns/op 2502790 ops/s 4853824 B/op 126200 allocs/op +BenchmarkTasks/Loop10W50K/1Ku-1Kt/ErrGroup-8 2 377909349 ns/op 2646137 ops/s 40051080 B/op 2001176 allocs/op +BenchmarkTasks/Loop10W50K/1Ku-1Kt/Gopool-8 2 332603044 ns/op 3006587 ops/s 3093716 B/op 157458 allocs/op +BenchmarkTasks/Loop10W50K/1Ku-1Kt/GoroutinePool-8 2 354335990 ns/op 2822180 ops/s 4855576 B/op 126216 allocs/op +BenchmarkTasks/Loop10W50K/1Ku-1Kt/BufferedPool-8 2 301174166 ns/op 3320338 ops/s 12803384 B/op 125719 allocs/op +BenchmarkTasks/Loop10W50K/1Ku-1Kt/Pond-8 2 1557318721 ns/op 642129 ops/s 252033112 B/op 7046072 allocs/op +BenchmarkTasks/Loop10W50K/10Ku-100t/VarMQ-8 2 100879527 ns/op 9912814 ops/s 86989780 B/op 1017493 allocs/op +BenchmarkTasks/Loop10W50K/10Ku-100t/Ants-8 2 388352160 ns/op 2574982 ops/s 4719972 B/op 70074 allocs/op +BenchmarkTasks/Loop10W50K/10Ku-100t/WorkerPool-8 2 542794549 ns/op 1842318 ops/s 882632 B/op 15225 allocs/op +BenchmarkTasks/Loop10W50K/10Ku-100t/Conc-8 2 521684952 ns/op 1916866 ops/s 5523912 B/op 138612 allocs/op +BenchmarkTasks/Loop10W50K/10Ku-100t/ErrGroup-8 2 321465475 ns/op 3110754 ops/s 40333312 B/op 2010124 allocs/op +BenchmarkTasks/Loop10W50K/10Ku-100t/Gopool-8 2 313502860 ns/op 3189764 ops/s 2717224 B/op 81683 allocs/op +BenchmarkTasks/Loop10W50K/10Ku-100t/GoroutinePool-8 2 492312559 ns/op 2031230 ops/s 5430016 B/op 137774 allocs/op +BenchmarkTasks/Loop10W50K/10Ku-100t/BufferedPool-8 2 330879282 ns/op 3022250 ops/s 13085448 B/op 134666 allocs/op +BenchmarkTasks/Loop10W50K/10Ku-100t/Pond-8 2 1371777352 ns/op 728981 ops/s 249492024 B/op 6756018 allocs/op +BenchmarkTasks/Loop10W50K/1Mu-1t/VarMQ-8 2 190450472 ns/op 5250709 ops/s 122243196 B/op 2006914 allocs/op +BenchmarkTasks/Loop10W50K/1Mu-1t/Ants-8 2 396246606 ns/op 2523681 ops/s 32365540 B/op 1005243 allocs/op +BenchmarkTasks/Loop10W50K/1Mu-1t/WorkerPool-8 2 777127820 ns/op 1286790 ops/s 73366712 B/op 1369506 allocs/op +BenchmarkTasks/Loop10W50K/1Mu-1t/Conc-8 2 683460080 ns/op 1463143 ops/s 36758320 B/op 1124633 allocs/op +BenchmarkTasks/Loop10W50K/1Mu-1t/ErrGroup-8 2 270272938 ns/op 3699963 ops/s 72000264 B/op 3000008 allocs/op +BenchmarkTasks/Loop10W50K/1Mu-1t/Gopool-8 2 503753336 ns/op 1985099 ops/s 43174772 B/op 1693275 allocs/op +BenchmarkTasks/Loop10W50K/1Mu-1t/GoroutinePool-8 2 501452926 ns/op 1994205 ops/s 36778160 B/op 1124811 allocs/op +BenchmarkTasks/Loop10W50K/1Mu-1t/BufferedPool-8 2 505611852 ns/op 1977802 ops/s 44773568 B/op 1124739 allocs/op +BenchmarkTasks/Loop10W50K/1Mu-1t/Pond-8 2 2004993344 ns/op 498755 ops/s 310502072 B/op 7496578 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1u-1Mt/VarMQ-8 2 245568670 ns/op 4072181 ops/s 111141740 B/op 1302865 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1u-1Mt/Ants-8 2 445328031 ns/op 2245536 ops/s 12927424 B/op 162315 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1u-1Mt/WorkerPool-8 2 1570850236 ns/op 636598 ops/s 1458144 B/op 19953 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1u-1Mt/Conc-8 2 534487962 ns/op 1870950 ops/s 9562048 B/op 174667 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1u-1Mt/ErrGroup-8 2 359839753 ns/op 2779015 ops/s 136000296 B/op 3000009 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1u-1Mt/Gopool-8 2 554324508 ns/op 1803997 ops/s 75483756 B/op 1607498 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1u-1Mt/GoroutinePool-8 2 475478886 ns/op 2103143 ops/s 9584576 B/op 174869 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1u-1Mt/BufferedPool-8 2 469327102 ns/op 2130710 ops/s 17571976 B/op 174725 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1u-1Mt/Pond-8 2 1386278890 ns/op 721356 ops/s 339766208 B/op 8017778 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/100u-10Kt/VarMQ-8 2 230740580 ns/op 4333871 ops/s 115851628 B/op 1328626 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/100u-10Kt/Ants-8 2 404242679 ns/op 2473762 ops/s 6843772 B/op 86149 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/100u-10Kt/WorkerPool-8 2 652740768 ns/op 1532002 ops/s 1786472 B/op 24451 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/100u-10Kt/Conc-8 2 567480616 ns/op 1762175 ops/s 9563592 B/op 174752 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/100u-10Kt/ErrGroup-8 2 362801048 ns/op 2756332 ops/s 136004752 B/op 3000119 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/100u-10Kt/Gopool-8 2 562867974 ns/op 1776616 ops/s 64895016 B/op 1430480 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/100u-10Kt/GoroutinePool-8 2 501094328 ns/op 1995632 ops/s 9585112 B/op 174944 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/100u-10Kt/BufferedPool-8 2 280801770 ns/op 3561231 ops/s 17577720 B/op 174847 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/100u-10Kt/Pond-8 2 1315941054 ns/op 759912 ops/s 339063776 B/op 8011821 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Ku-1Kt/VarMQ-8 2 231015836 ns/op 4328708 ops/s 114235404 B/op 1305711 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Ku-1Kt/Ants-8 2 416219598 ns/op 2402578 ops/s 6984268 B/op 88496 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Ku-1Kt/WorkerPool-8 2 602705912 ns/op 1659184 ops/s 2048560 B/op 28534 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Ku-1Kt/Conc-8 2 583137758 ns/op 1714861 ops/s 9601240 B/op 175731 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Ku-1Kt/ErrGroup-8 2 394218674 ns/op 2536663 ops/s 136065472 B/op 3001304 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Ku-1Kt/Gopool-8 2 622028482 ns/op 1607643 ops/s 70932420 B/op 1524198 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Ku-1Kt/GoroutinePool-8 2 478007369 ns/op 2092018 ops/s 9606632 B/op 175779 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Ku-1Kt/BufferedPool-8 2 292779318 ns/op 3415542 ops/s 17609880 B/op 175777 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Ku-1Kt/Pond-8 2 1328581018 ns/op 752683 ops/s 338932248 B/op 8011289 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/10Ku-100t/VarMQ-8 2 248977602 ns/op 4016426 ops/s 114943124 B/op 1326819 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/10Ku-100t/Ants-8 2 458229862 ns/op 2182311 ops/s 11959632 B/op 157175 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/10Ku-100t/WorkerPool-8 2 676146788 ns/op 1478969 ops/s 2891592 B/op 43571 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/10Ku-100t/Conc-8 2 866399164 ns/op 1154202 ops/s 9886328 B/op 184705 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/10Ku-100t/ErrGroup-8 2 479182526 ns/op 2086887 ops/s 136821016 B/op 3014479 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/10Ku-100t/Gopool-8 2 431056016 ns/op 2319884 ops/s 29336108 B/op 524354 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/10Ku-100t/GoroutinePool-8 2 495315491 ns/op 2018915 ops/s 9889816 B/op 184736 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/10Ku-100t/BufferedPool-8 2 270058146 ns/op 3702906 ops/s 17891552 B/op 184721 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/10Ku-100t/Pond-8 2 1527798819 ns/op 654536 ops/s 347294288 B/op 8034726 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Mu-1t/VarMQ-8 2 340193240 ns/op 2939506 ops/s 136260884 B/op 2229904 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Mu-1t/Ants-8 2 545681894 ns/op 1832570 ops/s 39068408 B/op 1089076 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Mu-1t/WorkerPool-8 2 827182751 ns/op 1208923 ops/s 76597096 B/op 1399087 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Mu-1t/Conc-8 2 708526806 ns/op 1411379 ops/s 41560168 B/op 1174650 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Mu-1t/ErrGroup-8 2 350436636 ns/op 2853583 ops/s 168000264 B/op 4000008 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Mu-1t/Gopool-8 2 616878688 ns/op 1621064 ops/s 80386184 B/op 1737414 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Mu-1t/GoroutinePool-8 2 609609919 ns/op 1640393 ops/s 41570152 B/op 1174739 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Mu-1t/BufferedPool-8 2 603574012 ns/op 1656798 ops/s 49578776 B/op 1174785 allocs/op +BenchmarkTasks/Sleep5msLoop5W50K/1Mu-1t/Pond-8 2 1501333223 ns/op 666075 ops/s 355517416 B/op 7460771 allocs/op +BenchmarkTasks/Sleep10msW100K/1u-1Mt/VarMQ-8 2 302196024 ns/op 3309110 ops/s 121625628 B/op 1488994 allocs/op +BenchmarkTasks/Sleep10msW100K/1u-1Mt/Ants-8 2 468550918 ns/op 2134240 ops/s 17907244 B/op 221939 allocs/op +BenchmarkTasks/Sleep10msW100K/1u-1Mt/WorkerPool-8 2 1057889635 ns/op 945278 ops/s 2867984 B/op 39092 allocs/op +BenchmarkTasks/Sleep10msW100K/1u-1Mt/Conc-8 2 610160976 ns/op 1638912 ops/s 19167144 B/op 349713 allocs/op +BenchmarkTasks/Sleep10msW100K/1u-1Mt/ErrGroup-8 2 369098902 ns/op 2709301 ops/s 136000296 B/op 3000009 allocs/op +BenchmarkTasks/Sleep10msW100K/1u-1Mt/Gopool-8 2 563576669 ns/op 1774381 ops/s 77626040 B/op 1631864 allocs/op +BenchmarkTasks/Sleep10msW100K/1u-1Mt/GoroutinePool-8 2 524622500 ns/op 1906133 ops/s 19185864 B/op 349880 allocs/op +BenchmarkTasks/Sleep10msW100K/1u-1Mt/BufferedPool-8 2 522176510 ns/op 1915061 ops/s 27176232 B/op 349763 allocs/op +BenchmarkTasks/Sleep10msW100K/1u-1Mt/Pond-8 2 1501921604 ns/op 665814 ops/s 341973088 B/op 8022253 allocs/op +BenchmarkTasks/Sleep10msW100K/100u-10Kt/VarMQ-8 2 293086192 ns/op 3411966 ops/s 123807124 B/op 1475074 allocs/op +BenchmarkTasks/Sleep10msW100K/100u-10Kt/Ants-8 2 431289096 ns/op 2318630 ops/s 11921500 B/op 151385 allocs/op +BenchmarkTasks/Sleep10msW100K/100u-10Kt/WorkerPool-8 2 667366248 ns/op 1498428 ops/s 3115712 B/op 42572 allocs/op +BenchmarkTasks/Sleep10msW100K/100u-10Kt/Conc-8 2 634948570 ns/op 1574931 ops/s 19176136 B/op 349864 allocs/op +BenchmarkTasks/Sleep10msW100K/100u-10Kt/ErrGroup-8 2 391817628 ns/op 2552208 ops/s 136120112 B/op 3000126 allocs/op +BenchmarkTasks/Sleep10msW100K/100u-10Kt/Gopool-8 2 579291348 ns/op 1726247 ops/s 67180480 B/op 1467921 allocs/op +BenchmarkTasks/Sleep10msW100K/100u-10Kt/GoroutinePool-8 2 575278110 ns/op 1738290 ops/s 19180576 B/op 349904 allocs/op +BenchmarkTasks/Sleep10msW100K/100u-10Kt/BufferedPool-8 2 330840014 ns/op 3022609 ops/s 28077552 B/op 349839 allocs/op +BenchmarkTasks/Sleep10msW100K/100u-10Kt/Pond-8 2 1433554176 ns/op 697567 ops/s 343094688 B/op 8032338 allocs/op +BenchmarkTasks/Sleep10msW100K/1Ku-1Kt/VarMQ-8 2 299834243 ns/op 3335176 ops/s 123479012 B/op 1468347 allocs/op +BenchmarkTasks/Sleep10msW100K/1Ku-1Kt/Ants-8 2 442480478 ns/op 2259987 ops/s 12630612 B/op 161743 allocs/op +BenchmarkTasks/Sleep10msW100K/1Ku-1Kt/WorkerPool-8 2 635180402 ns/op 1574356 ops/s 3375488 B/op 46559 allocs/op +BenchmarkTasks/Sleep10msW100K/1Ku-1Kt/Conc-8 2 645588481 ns/op 1548974 ops/s 19201968 B/op 350737 allocs/op +BenchmarkTasks/Sleep10msW100K/1Ku-1Kt/ErrGroup-8 2 389191458 ns/op 2569429 ops/s 136067376 B/op 3001321 allocs/op +BenchmarkTasks/Sleep10msW100K/1Ku-1Kt/Gopool-8 2 636622922 ns/op 1570789 ops/s 72355008 B/op 1541629 allocs/op +BenchmarkTasks/Sleep10msW100K/1Ku-1Kt/GoroutinePool-8 2 573796506 ns/op 1742778 ops/s 19206016 B/op 350774 allocs/op +BenchmarkTasks/Sleep10msW100K/1Ku-1Kt/BufferedPool-8 2 318860028 ns/op 3136172 ops/s 27206800 B/op 350750 allocs/op +BenchmarkTasks/Sleep10msW100K/1Ku-1Kt/Pond-8 2 1463156394 ns/op 683454 ops/s 342104120 B/op 8024136 allocs/op +BenchmarkTasks/Sleep10msW100K/10Ku-100t/VarMQ-8 2 308785266 ns/op 3238496 ops/s 125148828 B/op 1484397 allocs/op +BenchmarkTasks/Sleep10msW100K/10Ku-100t/Ants-8 2 499982612 ns/op 2000070 ops/s 15748904 B/op 204049 allocs/op +BenchmarkTasks/Sleep10msW100K/10Ku-100t/WorkerPool-8 2 690501491 ns/op 1448223 ops/s 3723584 B/op 56277 allocs/op +BenchmarkTasks/Sleep10msW100K/10Ku-100t/Conc-8 2 684573253 ns/op 1460764 ops/s 19482880 B/op 359674 allocs/op +BenchmarkTasks/Sleep10msW100K/10Ku-100t/ErrGroup-8 2 394704176 ns/op 2533543 ops/s 136757848 B/op 3013915 allocs/op +BenchmarkTasks/Sleep10msW100K/10Ku-100t/Gopool-8 2 634312575 ns/op 1576510 ops/s 75829980 B/op 1578524 allocs/op +BenchmarkTasks/Sleep10msW100K/10Ku-100t/GoroutinePool-8 2 544628184 ns/op 1836115 ops/s 19490264 B/op 359740 allocs/op +BenchmarkTasks/Sleep10msW100K/10Ku-100t/BufferedPool-8 2 357275086 ns/op 2798964 ops/s 27486960 B/op 359680 allocs/op +BenchmarkTasks/Sleep10msW100K/10Ku-100t/Pond-8 2 1286335652 ns/op 777402 ops/s 348580872 B/op 8057444 allocs/op +BenchmarkTasks/Sleep10msW100K/1Mu-1t/VarMQ-8 2 377795175 ns/op 2646937 ops/s 147311372 B/op 2381918 allocs/op +BenchmarkTasks/Sleep10msW100K/1Mu-1t/Ants-8 2 575142305 ns/op 1738700 ops/s 44233296 B/op 1155824 allocs/op +BenchmarkTasks/Sleep10msW100K/1Mu-1t/WorkerPool-8 2 860138060 ns/op 1162604 ops/s 79916712 B/op 1425593 allocs/op +BenchmarkTasks/Sleep10msW100K/1Mu-1t/Conc-8 2 786671258 ns/op 1271179 ops/s 51162352 B/op 1349669 allocs/op +BenchmarkTasks/Sleep10msW100K/1Mu-1t/ErrGroup-8 2 365942012 ns/op 2732673 ops/s 168009392 B/op 4000089 allocs/op +BenchmarkTasks/Sleep10msW100K/1Mu-1t/Gopool-8 2 712761198 ns/op 1402994 ops/s 92750724 B/op 1933881 allocs/op +BenchmarkTasks/Sleep10msW100K/1Mu-1t/GoroutinePool-8 2 668711037 ns/op 1495414 ops/s 51170656 B/op 1349744 allocs/op +BenchmarkTasks/Sleep10msW100K/1Mu-1t/BufferedPool-8 2 671420435 ns/op 1489380 ops/s 59168864 B/op 1349697 allocs/op +BenchmarkTasks/Sleep10msW100K/1Mu-1t/Pond-8 2 1710872670 ns/op 584497 ops/s 361288272 B/op 7592058 allocs/op +BenchmarkTasks/Loop10W100K/1u-1Mt/VarMQ-8 2 121715410 ns/op 8215887 ops/s 86144476 B/op 1003379 allocs/op +BenchmarkTasks/Loop10W100K/1u-1Mt/Ants-8 2 305719302 ns/op 3270974 ops/s 347144 B/op 5057 allocs/op +BenchmarkTasks/Loop10W100K/1u-1Mt/WorkerPool-8 2 819619464 ns/op 1220078 ops/s 1128 B/op 22 allocs/op +BenchmarkTasks/Loop10W100K/1u-1Mt/Conc-8 2 523803120 ns/op 1909114 ops/s 9560872 B/op 249657 allocs/op +BenchmarkTasks/Loop10W100K/1u-1Mt/ErrGroup-8 2 311501026 ns/op 3210262 ops/s 40000296 B/op 2000009 allocs/op +BenchmarkTasks/Loop10W100K/1u-1Mt/Gopool-8 2 482019520 ns/op 2074605 ops/s 17444644 B/op 991569 allocs/op +BenchmarkTasks/Loop10W100K/1u-1Mt/GoroutinePool-8 2 418633841 ns/op 2388722 ops/s 9586144 B/op 249883 allocs/op +BenchmarkTasks/Loop10W100K/1u-1Mt/BufferedPool-8 2 403964974 ns/op 2475462 ops/s 17563688 B/op 249651 allocs/op +BenchmarkTasks/Loop10W100K/1u-1Mt/Pond-8 2 1147211732 ns/op 871679 ops/s 241015920 B/op 7003377 allocs/op +BenchmarkTasks/Loop10W100K/100u-10Kt/VarMQ-8 2 95334327 ns/op 10489401 ops/s 86496708 B/op 1005654 allocs/op +BenchmarkTasks/Loop10W100K/100u-10Kt/Ants-8 2 359486102 ns/op 2781749 ops/s 96628 B/op 1521 allocs/op +BenchmarkTasks/Loop10W100K/100u-10Kt/WorkerPool-8 2 449968812 ns/op 2222376 ops/s 7648 B/op 222 allocs/op +BenchmarkTasks/Loop10W100K/100u-10Kt/Conc-8 2 482012336 ns/op 2074636 ops/s 9592712 B/op 250012 allocs/op +BenchmarkTasks/Loop10W100K/100u-10Kt/ErrGroup-8 2 367423072 ns/op 2721658 ops/s 40003464 B/op 2000108 allocs/op +BenchmarkTasks/Loop10W100K/100u-10Kt/Gopool-8 2 458291500 ns/op 2182017 ops/s 9861784 B/op 606393 allocs/op +BenchmarkTasks/Loop10W100K/100u-10Kt/GoroutinePool-8 2 451593290 ns/op 2214382 ops/s 9582536 B/op 249921 allocs/op +BenchmarkTasks/Loop10W100K/100u-10Kt/BufferedPool-8 2 337080080 ns/op 2966654 ops/s 17575592 B/op 249828 allocs/op +BenchmarkTasks/Loop10W100K/100u-10Kt/Pond-8 2 1291765602 ns/op 774134 ops/s 242701176 B/op 7008583 allocs/op +BenchmarkTasks/Loop10W100K/1Ku-1Kt/VarMQ-8 2 100139093 ns/op 9986110 ops/s 87373116 B/op 1013932 allocs/op +BenchmarkTasks/Loop10W100K/1Ku-1Kt/Ants-8 2 368617300 ns/op 2712841 ops/s 587116 B/op 9045 allocs/op +BenchmarkTasks/Loop10W100K/1Ku-1Kt/WorkerPool-8 2 491734455 ns/op 2033618 ops/s 87376 B/op 1723 allocs/op +BenchmarkTasks/Loop10W100K/1Ku-1Kt/Conc-8 2 452975592 ns/op 2207624 ops/s 9602192 B/op 250739 allocs/op +BenchmarkTasks/Loop10W100K/1Ku-1Kt/ErrGroup-8 2 347789278 ns/op 2875304 ops/s 40035680 B/op 2001038 allocs/op +BenchmarkTasks/Loop10W100K/1Ku-1Kt/Gopool-8 2 353571851 ns/op 2828279 ops/s 3468812 B/op 187822 allocs/op +BenchmarkTasks/Loop10W100K/1Ku-1Kt/GoroutinePool-8 2 398921500 ns/op 2506759 ops/s 9651208 B/op 251177 allocs/op +BenchmarkTasks/Loop10W100K/1Ku-1Kt/BufferedPool-8 2 366928265 ns/op 2725328 ops/s 17595768 B/op 250651 allocs/op +BenchmarkTasks/Loop10W100K/1Ku-1Kt/Pond-8 2 1362990923 ns/op 733681 ops/s 247869560 B/op 7024425 allocs/op +BenchmarkTasks/Loop10W100K/10Ku-100t/VarMQ-8 2 106171128 ns/op 9418756 ops/s 87390452 B/op 1020910 allocs/op +BenchmarkTasks/Loop10W100K/10Ku-100t/Ants-8 2 410323117 ns/op 2437104 ops/s 5623308 B/op 79156 allocs/op +BenchmarkTasks/Loop10W100K/10Ku-100t/WorkerPool-8 2 518992671 ns/op 1926809 ops/s 887448 B/op 15367 allocs/op +BenchmarkTasks/Loop10W100K/10Ku-100t/Conc-8 2 446319708 ns/op 2240546 ops/s 10075720 B/op 261396 allocs/op +BenchmarkTasks/Loop10W100K/10Ku-100t/ErrGroup-8 2 303173608 ns/op 3298440 ops/s 40324352 B/op 2010044 allocs/op +BenchmarkTasks/Loop10W100K/10Ku-100t/Gopool-8 2 305649309 ns/op 3271723 ops/s 3315948 B/op 111989 allocs/op +BenchmarkTasks/Loop10W100K/10Ku-100t/GoroutinePool-8 2 381381508 ns/op 2622046 ops/s 10092480 B/op 261546 allocs/op +BenchmarkTasks/Loop10W100K/10Ku-100t/BufferedPool-8 2 395923606 ns/op 2525740 ops/s 17881696 B/op 259633 allocs/op +BenchmarkTasks/Loop10W100K/10Ku-100t/Pond-8 2 1577593853 ns/op 633877 ops/s 260541064 B/op 6992063 allocs/op +BenchmarkTasks/Loop10W100K/1Mu-1t/VarMQ-8 2 194810788 ns/op 5133186 ops/s 122976444 B/op 2007085 allocs/op +BenchmarkTasks/Loop10W100K/1Mu-1t/Ants-8 2 400088721 ns/op 2499446 ops/s 32260572 B/op 1003776 allocs/op +BenchmarkTasks/Loop10W100K/1Mu-1t/WorkerPool-8 2 765423309 ns/op 1306467 ops/s 72752336 B/op 1364056 allocs/op +BenchmarkTasks/Loop10W100K/1Mu-1t/Conc-8 2 587000710 ns/op 1703575 ops/s 41563584 B/op 1249680 allocs/op +BenchmarkTasks/Loop10W100K/1Mu-1t/ErrGroup-8 2 272940236 ns/op 3663806 ops/s 72000264 B/op 3000008 allocs/op +BenchmarkTasks/Loop10W100K/1Mu-1t/Gopool-8 2 506920786 ns/op 1972695 ops/s 43514208 B/op 1686286 allocs/op +BenchmarkTasks/Loop10W100K/1Mu-1t/GoroutinePool-8 2 536268208 ns/op 1864739 ops/s 41565280 B/op 1249696 allocs/op +BenchmarkTasks/Loop10W100K/1Mu-1t/BufferedPool-8 2 528458075 ns/op 1892298 ops/s 49571944 B/op 1249724 allocs/op +BenchmarkTasks/Loop10W100K/1Mu-1t/Pond-8 2 3524241187 ns/op 283749 ops/s 347305184 B/op 8242196 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1u-1Mt/VarMQ-8 2 269211477 ns/op 3714552 ops/s 109477700 B/op 1309163 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1u-1Mt/Ants-8 2 443408798 ns/op 2255255 ops/s 12378176 B/op 158626 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1u-1Mt/WorkerPool-8 2 1123611018 ns/op 889988 ops/s 1568080 B/op 21359 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1u-1Mt/Conc-8 2 609332828 ns/op 1641139 ops/s 19163728 B/op 349682 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1u-1Mt/ErrGroup-8 2 343029870 ns/op 2915198 ops/s 136000296 B/op 3000009 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1u-1Mt/Gopool-8 2 525424172 ns/op 1903224 ops/s 75944100 B/op 1611071 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1u-1Mt/GoroutinePool-8 2 508622724 ns/op 1966094 ops/s 19182504 B/op 349850 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1u-1Mt/BufferedPool-8 2 517152722 ns/op 1933665 ops/s 27174048 B/op 349744 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1u-1Mt/Pond-8 2 1410108934 ns/op 709165 ops/s 338978736 B/op 8010991 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/100u-10Kt/VarMQ-8 2 244065528 ns/op 4097260 ops/s 115450404 B/op 1343317 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/100u-10Kt/Ants-8 2 409119443 ns/op 2444274 ops/s 7052568 B/op 88873 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/100u-10Kt/WorkerPool-8 2 661508512 ns/op 1511696 ops/s 1841128 B/op 25110 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/100u-10Kt/Conc-8 2 618866650 ns/op 1615857 ops/s 19164264 B/op 349758 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/100u-10Kt/ErrGroup-8 2 384661248 ns/op 2599690 ops/s 136004864 B/op 3000120 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/100u-10Kt/Gopool-8 2 550748968 ns/op 1815709 ops/s 66279112 B/op 1451286 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/100u-10Kt/GoroutinePool-8 2 581221272 ns/op 1720515 ops/s 19182928 B/op 349925 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/100u-10Kt/BufferedPool-8 2 438302472 ns/op 2281529 ops/s 27174696 B/op 349820 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/100u-10Kt/Pond-8 2 1313154780 ns/op 761525 ops/s 338992880 B/op 8011188 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Ku-1Kt/VarMQ-8 2 238497747 ns/op 4192912 ops/s 117780668 B/op 1363279 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Ku-1Kt/Ants-8 2 425980543 ns/op 2347525 ops/s 6950664 B/op 87984 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Ku-1Kt/WorkerPool-8 2 605136982 ns/op 1652518 ops/s 1781400 B/op 24875 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Ku-1Kt/Conc-8 2 599517744 ns/op 1668007 ops/s 19204280 B/op 350758 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Ku-1Kt/ErrGroup-8 2 382475121 ns/op 2614549 ops/s 136055224 B/op 3001213 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Ku-1Kt/Gopool-8 2 619376332 ns/op 1614527 ops/s 70646820 B/op 1519272 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Ku-1Kt/GoroutinePool-8 2 564588528 ns/op 1771201 ops/s 19207192 B/op 350784 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Ku-1Kt/BufferedPool-8 2 426264808 ns/op 2345960 ops/s 27206016 B/op 350743 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Ku-1Kt/Pond-8 2 1359871486 ns/op 735364 ops/s 339113800 B/op 8012910 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/10Ku-100t/VarMQ-8 2 251358908 ns/op 3978375 ops/s 119102084 B/op 1370758 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/10Ku-100t/Ants-8 2 458572610 ns/op 2180680 ops/s 11870812 B/op 156112 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/10Ku-100t/WorkerPool-8 2 657325545 ns/op 1521316 ops/s 2290792 B/op 35820 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/10Ku-100t/Conc-8 2 748681380 ns/op 1335682 ops/s 19485832 B/op 359700 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/10Ku-100t/ErrGroup-8 2 374234420 ns/op 2672122 ops/s 136747992 B/op 3013827 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/10Ku-100t/Gopool-8 2 642058252 ns/op 1557491 ops/s 74111156 B/op 1556865 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/10Ku-100t/GoroutinePool-8 2 537220554 ns/op 1861433 ops/s 19491664 B/op 359753 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/10Ku-100t/BufferedPool-8 2 389633520 ns/op 2566514 ops/s 27497432 B/op 359773 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/10Ku-100t/Pond-8 2 1574236779 ns/op 635228 ops/s 351728128 B/op 8085545 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Mu-1t/VarMQ-8 2 387546872 ns/op 2580333 ops/s 133247244 B/op 2197473 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Mu-1t/Ants-8 2 552667496 ns/op 1809406 ops/s 39009580 B/op 1089434 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Mu-1t/WorkerPool-8 2 819977756 ns/op 1219545 ops/s 74426088 B/op 1388141 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Mu-1t/Conc-8 2 761211574 ns/op 1313695 ops/s 51166440 B/op 1349706 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Mu-1t/ErrGroup-8 2 364400451 ns/op 2744234 ops/s 168001272 B/op 4000017 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Mu-1t/Gopool-8 2 659758441 ns/op 1515706 ops/s 96771624 B/op 2023622 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Mu-1t/GoroutinePool-8 2 650505822 ns/op 1537265 ops/s 51169984 B/op 1349738 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Mu-1t/BufferedPool-8 2 644246854 ns/op 1552200 ops/s 59169872 B/op 1349706 allocs/op +BenchmarkTasks/Sleep5msLoop5W100K/1Mu-1t/Pond-8 2 1754576606 ns/op 569938 ops/s 364267960 B/op 7652306 allocs/op +BenchmarkTasks/Sleep10msW300K/1u-1Mt/VarMQ-8 2 407541042 ns/op 2453741 ops/s 111111756 B/op 1372116 allocs/op +BenchmarkTasks/Sleep10msW300K/1u-1Mt/Ants-8 2 490450212 ns/op 2038943 ops/s 21854968 B/op 270563 allocs/op +BenchmarkTasks/Sleep10msW300K/1u-1Mt/WorkerPool-8 2 1242959060 ns/op 804532 ops/s 2807584 B/op 38308 allocs/op +BenchmarkTasks/Sleep10msW300K/1u-1Mt/Conc-8 2 848143222 ns/op 1179046 ops/s 57563448 B/op 1049680 allocs/op +BenchmarkTasks/Sleep10msW300K/1u-1Mt/ErrGroup-8 2 376040225 ns/op 2659290 ops/s 136000296 B/op 3000009 allocs/op +BenchmarkTasks/Sleep10msW300K/1u-1Mt/Gopool-8 2 529148261 ns/op 1889830 ops/s 77358800 B/op 1629187 allocs/op +BenchmarkTasks/Sleep10msW300K/1u-1Mt/GoroutinePool-8 2 666640190 ns/op 1500060 ops/s 57577912 B/op 1049809 allocs/op +BenchmarkTasks/Sleep10msW300K/1u-1Mt/BufferedPool-8 2 615215048 ns/op 1625448 ops/s 65574328 B/op 1049746 allocs/op +BenchmarkTasks/Sleep10msW300K/1u-1Mt/Pond-8 2 1502214064 ns/op 665684 ops/s 341646048 B/op 8019333 allocs/op +BenchmarkTasks/Sleep10msW300K/100u-10Kt/VarMQ-8 2 373988842 ns/op 2673877 ops/s 111647716 B/op 1376500 allocs/op +BenchmarkTasks/Sleep10msW300K/100u-10Kt/Ants-8 2 427984100 ns/op 2336535 ops/s 12412000 B/op 158871 allocs/op +BenchmarkTasks/Sleep10msW300K/100u-10Kt/WorkerPool-8 2 669469863 ns/op 1493719 ops/s 3278256 B/op 44565 allocs/op +BenchmarkTasks/Sleep10msW300K/100u-10Kt/Conc-8 2 788466549 ns/op 1268285 ops/s 57564200 B/op 1049749 allocs/op +BenchmarkTasks/Sleep10msW300K/100u-10Kt/ErrGroup-8 2 412001982 ns/op 2427173 ops/s 136003464 B/op 3000108 allocs/op +BenchmarkTasks/Sleep10msW300K/100u-10Kt/Gopool-8 2 565196017 ns/op 1769298 ops/s 68342560 B/op 1482463 allocs/op +BenchmarkTasks/Sleep10msW300K/100u-10Kt/GoroutinePool-8 2 715674421 ns/op 1397283 ops/s 57727696 B/op 1049901 allocs/op +BenchmarkTasks/Sleep10msW300K/100u-10Kt/BufferedPool-8 2 523060502 ns/op 1911825 ops/s 65574752 B/op 1049821 allocs/op +BenchmarkTasks/Sleep10msW300K/100u-10Kt/Pond-8 2 1415610145 ns/op 706409 ops/s 343372952 B/op 8034822 allocs/op +BenchmarkTasks/Sleep10msW300K/1Ku-1Kt/VarMQ-8 2 371995936 ns/op 2688201 ops/s 113815916 B/op 1400529 allocs/op +BenchmarkTasks/Sleep10msW300K/1Ku-1Kt/Ants-8 2 452821294 ns/op 2208377 ops/s 12267076 B/op 156583 allocs/op +BenchmarkTasks/Sleep10msW300K/1Ku-1Kt/WorkerPool-8 2 623275933 ns/op 1604426 ops/s 3383032 B/op 46647 allocs/op +BenchmarkTasks/Sleep10msW300K/1Ku-1Kt/Conc-8 2 804973642 ns/op 1242277 ops/s 57522072 B/op 1049916 allocs/op +BenchmarkTasks/Sleep10msW300K/1Ku-1Kt/ErrGroup-8 2 378695614 ns/op 2640643 ops/s 136045256 B/op 3001124 allocs/op +BenchmarkTasks/Sleep10msW300K/1Ku-1Kt/Gopool-8 2 628739032 ns/op 1590485 ops/s 72252636 B/op 1540300 allocs/op +BenchmarkTasks/Sleep10msW300K/1Ku-1Kt/GoroutinePool-8 2 726687048 ns/op 1376108 ops/s 57598232 B/op 1050704 allocs/op +BenchmarkTasks/Sleep10msW300K/1Ku-1Kt/BufferedPool-8 2 586491291 ns/op 1705055 ops/s 65601128 B/op 1050699 allocs/op +BenchmarkTasks/Sleep10msW300K/1Ku-1Kt/Pond-8 2 1411549996 ns/op 708441 ops/s 341624704 B/op 8019856 allocs/op +BenchmarkTasks/Sleep10msW300K/10Ku-100t/VarMQ-8 2 341450272 ns/op 2928684 ops/s 119069900 B/op 1470765 allocs/op +BenchmarkTasks/Sleep10msW300K/10Ku-100t/Ants-8 2 492806134 ns/op 2029196 ops/s 17335584 B/op 217935 allocs/op +BenchmarkTasks/Sleep10msW300K/10Ku-100t/WorkerPool-8 2 683700186 ns/op 1462629 ops/s 3412656 B/op 52119 allocs/op +BenchmarkTasks/Sleep10msW300K/10Ku-100t/Conc-8 2 797487407 ns/op 1253938 ops/s 57606536 B/op 1056792 allocs/op +BenchmarkTasks/Sleep10msW300K/10Ku-100t/ErrGroup-8 2 359474438 ns/op 2781839 ops/s 136539784 B/op 3011968 allocs/op +BenchmarkTasks/Sleep10msW300K/10Ku-100t/Gopool-8 2 630909706 ns/op 1585013 ops/s 75945468 B/op 1579846 allocs/op +BenchmarkTasks/Sleep10msW300K/10Ku-100t/GoroutinePool-8 2 682110377 ns/op 1466038 ops/s 57889368 B/op 1059732 allocs/op +BenchmarkTasks/Sleep10msW300K/10Ku-100t/BufferedPool-8 2 592408678 ns/op 1688024 ops/s 65890208 B/op 1059709 allocs/op +BenchmarkTasks/Sleep10msW300K/10Ku-100t/Pond-8 2 1228837608 ns/op 813777 ops/s 348761528 B/op 8059057 allocs/op +BenchmarkTasks/Sleep10msW300K/1Mu-1t/VarMQ-8 2 488981007 ns/op 2045069 ops/s 136335836 B/op 2233051 allocs/op +BenchmarkTasks/Sleep10msW300K/1Mu-1t/Ants-8 2 574275125 ns/op 1741326 ops/s 44202380 B/op 1155971 allocs/op +BenchmarkTasks/Sleep10msW300K/1Mu-1t/WorkerPool-8 2 851068454 ns/op 1174994 ops/s 80623248 B/op 1432537 allocs/op +BenchmarkTasks/Sleep10msW300K/1Mu-1t/Conc-8 2 923953634 ns/op 1082305 ops/s 89560896 B/op 2049656 allocs/op +BenchmarkTasks/Sleep10msW300K/1Mu-1t/ErrGroup-8 2 354267029 ns/op 2822730 ops/s 168000264 B/op 4000008 allocs/op +BenchmarkTasks/Sleep10msW300K/1Mu-1t/Gopool-8 2 1044433156 ns/op 957457 ops/s 140788480 B/op 2870203 allocs/op +BenchmarkTasks/Sleep10msW300K/1Mu-1t/GoroutinePool-8 2 754638112 ns/op 1325138 ops/s 89564608 B/op 2049690 allocs/op +BenchmarkTasks/Sleep10msW300K/1Mu-1t/BufferedPool-8 2 773754343 ns/op 1292400 ops/s 97573848 B/op 2049741 allocs/op +BenchmarkTasks/Sleep10msW300K/1Mu-1t/Pond-8 2 2752045594 ns/op 363366 ops/s 446042168 B/op 9189391 allocs/op +BenchmarkTasks/Loop10W300K/1u-1Mt/VarMQ-8 2 135729434 ns/op 7367599 ops/s 86255924 B/op 1003960 allocs/op +BenchmarkTasks/Loop10W300K/1u-1Mt/Ants-8 2 306086628 ns/op 3267049 ops/s 214144 B/op 3245 allocs/op +BenchmarkTasks/Loop10W300K/1u-1Mt/WorkerPool-8 2 850936714 ns/op 1175176 ops/s 1120 B/op 22 allocs/op +BenchmarkTasks/Loop10W300K/1u-1Mt/Conc-8 2 766577804 ns/op 1304499 ops/s 28768432 B/op 749724 allocs/op +BenchmarkTasks/Loop10W300K/1u-1Mt/ErrGroup-8 2 312503003 ns/op 3199969 ops/s 40000296 B/op 2000009 allocs/op +BenchmarkTasks/Loop10W300K/1u-1Mt/Gopool-8 2 511535464 ns/op 1954899 ops/s 15892376 B/op 983659 allocs/op +BenchmarkTasks/Loop10W300K/1u-1Mt/GoroutinePool-8 2 660988866 ns/op 1512885 ops/s 28780432 B/op 749832 allocs/op +BenchmarkTasks/Loop10W300K/1u-1Mt/BufferedPool-8 2 520615931 ns/op 1920802 ops/s 36774104 B/op 749744 allocs/op +BenchmarkTasks/Loop10W300K/1u-1Mt/Pond-8 2 1140252088 ns/op 876999 ops/s 240323160 B/op 7000817 allocs/op +BenchmarkTasks/Loop10W300K/100u-10Kt/VarMQ-8 2 100823841 ns/op 9918289 ops/s 86572788 B/op 1006156 allocs/op +BenchmarkTasks/Loop10W300K/100u-10Kt/Ants-8 2 353494326 ns/op 2828900 ops/s 76412 B/op 1305 allocs/op +BenchmarkTasks/Loop10W300K/100u-10Kt/WorkerPool-8 2 471487914 ns/op 2120945 ops/s 7496 B/op 221 allocs/op +BenchmarkTasks/Loop10W300K/100u-10Kt/Conc-8 2 676656150 ns/op 1477855 ops/s 28780056 B/op 749899 allocs/op +BenchmarkTasks/Loop10W300K/100u-10Kt/ErrGroup-8 2 369834678 ns/op 2703911 ops/s 40003464 B/op 2000108 allocs/op +BenchmarkTasks/Loop10W300K/100u-10Kt/Gopool-8 2 441598531 ns/op 2264500 ops/s 10579804 B/op 621219 allocs/op +BenchmarkTasks/Loop10W300K/100u-10Kt/GoroutinePool-8 2 561058163 ns/op 1782346 ops/s 28779624 B/op 749895 allocs/op +BenchmarkTasks/Loop10W300K/100u-10Kt/BufferedPool-8 2 556821986 ns/op 1795906 ops/s 36770552 B/op 749783 allocs/op +BenchmarkTasks/Loop10W300K/100u-10Kt/Pond-8 2 1262602216 ns/op 792015 ops/s 242730912 B/op 7008849 allocs/op +BenchmarkTasks/Loop10W300K/1Ku-1Kt/VarMQ-8 2 101552900 ns/op 9847085 ops/s 87265492 B/op 1012804 allocs/op +BenchmarkTasks/Loop10W300K/1Ku-1Kt/Ants-8 2 363757130 ns/op 2749087 ops/s 636080 B/op 9816 allocs/op +BenchmarkTasks/Loop10W300K/1Ku-1Kt/WorkerPool-8 2 465935830 ns/op 2146218 ops/s 85432 B/op 1731 allocs/op +BenchmarkTasks/Loop10W300K/1Ku-1Kt/Conc-8 2 669985894 ns/op 1492569 ops/s 28789480 B/op 750626 allocs/op +BenchmarkTasks/Loop10W300K/1Ku-1Kt/ErrGroup-8 2 356244825 ns/op 2807058 ops/s 40036520 B/op 2001046 allocs/op +BenchmarkTasks/Loop10W300K/1Ku-1Kt/Gopool-8 2 336071933 ns/op 2975553 ops/s 2977456 B/op 163267 allocs/op +BenchmarkTasks/Loop10W300K/1Ku-1Kt/GoroutinePool-8 2 545173970 ns/op 1834277 ops/s 28839728 B/op 751075 allocs/op +BenchmarkTasks/Loop10W300K/1Ku-1Kt/BufferedPool-8 2 519392670 ns/op 1925326 ops/s 36800416 B/op 750693 allocs/op +BenchmarkTasks/Loop10W300K/1Ku-1Kt/Pond-8 2 1193646282 ns/op 837769 ops/s 248244752 B/op 7024628 allocs/op +BenchmarkTasks/Loop10W300K/10Ku-100t/VarMQ-8 2 105120625 ns/op 9512881 ops/s 87262916 B/op 1019837 allocs/op +BenchmarkTasks/Loop10W300K/10Ku-100t/Ants-8 2 396261721 ns/op 2523585 ops/s 5557000 B/op 78677 allocs/op +BenchmarkTasks/Loop10W300K/10Ku-100t/WorkerPool-8 2 546566610 ns/op 1829603 ops/s 1024128 B/op 17653 allocs/op +BenchmarkTasks/Loop10W300K/10Ku-100t/Conc-8 2 674055864 ns/op 1483557 ops/s 29083808 B/op 759682 allocs/op +BenchmarkTasks/Loop10W300K/10Ku-100t/ErrGroup-8 2 281241459 ns/op 3555664 ops/s 40320264 B/op 2010008 allocs/op +BenchmarkTasks/Loop10W300K/10Ku-100t/Gopool-8 2 319019692 ns/op 3134603 ops/s 3114356 B/op 125405 allocs/op +BenchmarkTasks/Loop10W300K/10Ku-100t/GoroutinePool-8 2 583603528 ns/op 1713492 ops/s 29124592 B/op 760047 allocs/op +BenchmarkTasks/Loop10W300K/10Ku-100t/BufferedPool-8 2 559274092 ns/op 1788032 ops/s 37088752 B/op 759696 allocs/op +BenchmarkTasks/Loop10W300K/10Ku-100t/Pond-8 2 1328663120 ns/op 752636 ops/s 259041336 B/op 7084178 allocs/op +BenchmarkTasks/Loop10W300K/1Mu-1t/VarMQ-8 2 192465415 ns/op 5195739 ops/s 122963508 B/op 2006794 allocs/op +BenchmarkTasks/Loop10W300K/1Mu-1t/Ants-8 2 410367574 ns/op 2436840 ops/s 32379588 B/op 1005317 allocs/op +BenchmarkTasks/Loop10W300K/1Mu-1t/WorkerPool-8 2 769914707 ns/op 1298845 ops/s 72980016 B/op 1367360 allocs/op +BenchmarkTasks/Loop10W300K/1Mu-1t/Conc-8 2 757275156 ns/op 1320524 ops/s 60768064 B/op 1749720 allocs/op +BenchmarkTasks/Loop10W300K/1Mu-1t/ErrGroup-8 2 272266219 ns/op 3672876 ops/s 72000264 B/op 3000008 allocs/op +BenchmarkTasks/Loop10W300K/1Mu-1t/Gopool-8 2 505356470 ns/op 1978801 ops/s 43113268 B/op 1691349 allocs/op +BenchmarkTasks/Loop10W300K/1Mu-1t/GoroutinePool-8 2 647951324 ns/op 1543326 ops/s 60772280 B/op 1749758 allocs/op +BenchmarkTasks/Loop10W300K/1Mu-1t/BufferedPool-8 2 619293966 ns/op 1614742 ops/s 68764328 B/op 1749656 allocs/op +BenchmarkTasks/Loop10W300K/1Mu-1t/Pond-8 2 4037566775 ns/op 247674 ops/s 338804136 B/op 8472539 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1u-1Mt/VarMQ-8 2 419476305 ns/op 2383925 ops/s 100114980 B/op 1207462 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1u-1Mt/Ants-8 2 455806382 ns/op 2193914 ops/s 12206912 B/op 155704 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1u-1Mt/WorkerPool-8 2 1036149632 ns/op 965112 ops/s 1485592 B/op 20295 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1u-1Mt/Conc-8 2 834965519 ns/op 1197654 ops/s 57573976 B/op 1049774 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1u-1Mt/ErrGroup-8 2 354463966 ns/op 2821161 ops/s 136000296 B/op 3000009 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1u-1Mt/Gopool-8 2 534995723 ns/op 1869174 ops/s 76559948 B/op 1617449 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1u-1Mt/GoroutinePool-8 2 647295832 ns/op 1544889 ops/s 57580936 B/op 1049836 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1u-1Mt/BufferedPool-8 2 602429432 ns/op 1659945 ops/s 65575168 B/op 1049754 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1u-1Mt/Pond-8 2 1422510038 ns/op 702983 ops/s 338981424 B/op 8011015 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/100u-10Kt/VarMQ-8 2 376067834 ns/op 2659095 ops/s 99551284 B/op 1199455 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/100u-10Kt/Ants-8 2 402886198 ns/op 2482090 ops/s 6941520 B/op 87052 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/100u-10Kt/WorkerPool-8 2 685496793 ns/op 1458796 ops/s 1667744 B/op 22871 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/100u-10Kt/Conc-8 2 826345426 ns/op 1210148 ops/s 57549072 B/op 1049601 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/100u-10Kt/ErrGroup-8 2 396924558 ns/op 2519370 ops/s 136003464 B/op 3000108 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/100u-10Kt/Gopool-8 2 553605498 ns/op 1806340 ops/s 66961316 B/op 1466458 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/100u-10Kt/GoroutinePool-8 2 692537490 ns/op 1443965 ops/s 57580408 B/op 1049902 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/100u-10Kt/BufferedPool-8 2 638828825 ns/op 1565365 ops/s 65571840 B/op 1049795 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/100u-10Kt/Pond-8 2 1356195963 ns/op 737357 ops/s 339148728 B/op 8012579 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Ku-1Kt/VarMQ-8 2 365368252 ns/op 2736965 ops/s 101675572 B/op 1228056 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Ku-1Kt/Ants-8 2 431317408 ns/op 2318478 ops/s 6921180 B/op 87182 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Ku-1Kt/WorkerPool-8 2 605578676 ns/op 1651313 ops/s 1805608 B/op 25206 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Ku-1Kt/Conc-8 2 793712561 ns/op 1259902 ops/s 57501888 B/op 1049706 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Ku-1Kt/ErrGroup-8 2 369573400 ns/op 2705822 ops/s 136048952 B/op 3001157 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Ku-1Kt/Gopool-8 2 609381302 ns/op 1641009 ops/s 72420192 B/op 1538036 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Ku-1Kt/GoroutinePool-8 2 701166476 ns/op 1426195 ops/s 57601088 B/op 1050730 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Ku-1Kt/BufferedPool-8 2 564966030 ns/op 1770018 ops/s 65607808 B/op 1050759 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Ku-1Kt/Pond-8 2 1350044155 ns/op 740717 ops/s 338813304 B/op 8010227 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/10Ku-100t/VarMQ-8 2 343513770 ns/op 2911091 ops/s 105739020 B/op 1281624 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/10Ku-100t/Ants-8 2 486610920 ns/op 2055030 ops/s 11745136 B/op 154594 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/10Ku-100t/WorkerPool-8 2 663130667 ns/op 1507998 ops/s 2254704 B/op 35253 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/10Ku-100t/Conc-8 2 806228320 ns/op 1240343 ops/s 57649896 B/op 1057238 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/10Ku-100t/ErrGroup-8 2 361604234 ns/op 2765454 ops/s 136579824 B/op 3012325 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/10Ku-100t/Gopool-8 2 609916564 ns/op 1639569 ops/s 74342056 B/op 1561881 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/10Ku-100t/GoroutinePool-8 2 682134708 ns/op 1465986 ops/s 57893176 B/op 1059766 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/10Ku-100t/BufferedPool-8 2 651545218 ns/op 1534813 ops/s 65893624 B/op 1059739 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/10Ku-100t/Pond-8 2 1242685376 ns/op 804709 ops/s 346558000 B/op 8052194 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Mu-1t/VarMQ-8 2 480244535 ns/op 2082273 ops/s 130292436 B/op 2129950 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Mu-1t/Ants-8 2 546862630 ns/op 1828613 ops/s 39017560 B/op 1088244 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Mu-1t/WorkerPool-8 2 858477401 ns/op 1164853 ops/s 75183904 B/op 1394668 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Mu-1t/Conc-8 2 882652917 ns/op 1132948 ops/s 89561960 B/op 2049666 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Mu-1t/ErrGroup-8 2 343329114 ns/op 2912657 ops/s 168000264 B/op 4000008 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Mu-1t/Gopool-8 2 768244839 ns/op 1301668 ops/s 133772948 B/op 2777239 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Mu-1t/GoroutinePool-8 2 760914452 ns/op 1314208 ops/s 89567128 B/op 2049712 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Mu-1t/BufferedPool-8 2 744073808 ns/op 1343953 ops/s 97573960 B/op 2049742 allocs/op +BenchmarkTasks/Sleep5msLoop5W300K/1Mu-1t/Pond-8 2 2718649456 ns/op 367830 ops/s 440303920 B/op 9273605 allocs/op +BenchmarkTasks/Loop10W1/1u-1Mt/VarMQ-8 2 155161904 ns/op 6444881 ops/s 86092004 B/op 1002979 allocs/op +BenchmarkTasks/Loop10W1/1u-1Mt/Ants-8 2 465846215 ns/op 2146631 ops/s 2948 B/op 37 allocs/op +BenchmarkTasks/Loop10W1/1u-1Mt/WorkerPool-8 2 726922372 ns/op 1375663 ops/s 5902152 B/op 1265 allocs/op +BenchmarkTasks/Loop10W1/1u-1Mt/Conc-8 2 308642842 ns/op 3239991 ops/s 448 B/op 12 allocs/op +BenchmarkTasks/Loop10W1/1u-1Mt/ErrGroup-8 2 459026552 ns/op 2178523 ops/s 40000296 B/op 2000009 allocs/op +BenchmarkTasks/Loop10W1/1u-1Mt/Gopool-8 2 93199961 ns/op 10729618 ops/s 26446872 B/op 300799 allocs/op +BenchmarkTasks/Loop10W1/1u-1Mt/GoroutinePool-8 2 156094313 ns/op 6406383 ops/s 296 B/op 11 allocs/op +BenchmarkTasks/Loop10W1/1u-1Mt/BufferedPool-8 2 36991552 ns/op 27033200 ops/s 8003880 B/op 12 allocs/op +BenchmarkTasks/Loop10W1/1u-1Mt/Pond-8 2 360559360 ns/op 2773468 ops/s 253334384 B/op 6002133 allocs/op +BenchmarkTasks/Loop10W1/100u-10Kt/VarMQ-8 2 139492404 ns/op 7168849 ops/s 86219516 B/op 1003094 allocs/op +BenchmarkTasks/Loop10W1/100u-10Kt/Ants-8 2 792762570 ns/op 1261412 ops/s 6116 B/op 136 allocs/op +BenchmarkTasks/Loop10W1/100u-10Kt/WorkerPool-8 2 734540744 ns/op 1361395 ops/s 25180184 B/op 164 allocs/op +BenchmarkTasks/Loop10W1/100u-10Kt/Conc-8 2 494119323 ns/op 2023803 ops/s 5688 B/op 129 allocs/op +BenchmarkTasks/Loop10W1/100u-10Kt/ErrGroup-8 2 662248084 ns/op 1510008 ops/s 40003520 B/op 2000108 allocs/op +BenchmarkTasks/Loop10W1/100u-10Kt/Gopool-8 2 218715300 ns/op 4572154 ops/s 32826404 B/op 492412 allocs/op +BenchmarkTasks/Loop10W1/100u-10Kt/GoroutinePool-8 2 303884056 ns/op 3290729 ops/s 6656 B/op 138 allocs/op +BenchmarkTasks/Loop10W1/100u-10Kt/BufferedPool-8 2 39376972 ns/op 25395554 ops/s 8007048 B/op 111 allocs/op +BenchmarkTasks/Loop10W1/100u-10Kt/Pond-8 2 644666228 ns/op 1551190 ops/s 336864464 B/op 6008357 allocs/op +BenchmarkTasks/Loop10W1/1Ku-1Kt/VarMQ-8 2 137315712 ns/op 7282488 ops/s 86203100 B/op 1003988 allocs/op +BenchmarkTasks/Loop10W1/1Ku-1Kt/Ants-8 2 611514535 ns/op 1635284 ops/s 63588 B/op 1292 allocs/op +BenchmarkTasks/Loop10W1/1Ku-1Kt/WorkerPool-8 2 543839850 ns/op 1838777 ops/s 25259776 B/op 1517 allocs/op +BenchmarkTasks/Loop10W1/1Ku-1Kt/Conc-8 2 414832922 ns/op 2410609 ops/s 113448 B/op 1734 allocs/op +BenchmarkTasks/Loop10W1/1Ku-1Kt/ErrGroup-8 2 749113296 ns/op 1334912 ops/s 40058976 B/op 2001246 allocs/op +BenchmarkTasks/Loop10W1/1Ku-1Kt/Gopool-8 2 219136954 ns/op 4563356 ops/s 32864364 B/op 500889 allocs/op +BenchmarkTasks/Loop10W1/1Ku-1Kt/GoroutinePool-8 2 272326548 ns/op 3672062 ops/s 68608 B/op 1334 allocs/op +BenchmarkTasks/Loop10W1/1Ku-1Kt/BufferedPool-8 2 37940468 ns/op 26357081 ops/s 8035848 B/op 1011 allocs/op +BenchmarkTasks/Loop10W1/1Ku-1Kt/Pond-8 2 712208621 ns/op 1404083 ops/s 336830000 B/op 6009659 allocs/op +BenchmarkTasks/Loop10W1/10Ku-100t/VarMQ-8 2 139590187 ns/op 7163827 ops/s 86411972 B/op 1012978 allocs/op +BenchmarkTasks/Loop10W1/10Ku-100t/Ants-8 2 510836986 ns/op 1957572 ops/s 853684 B/op 14775 allocs/op +BenchmarkTasks/Loop10W1/10Ku-100t/WorkerPool-8 2 782308146 ns/op 1278269 ops/s 26045896 B/op 14965 allocs/op +BenchmarkTasks/Loop10W1/10Ku-100t/Conc-8 2 485112850 ns/op 2061376 ops/s 1404856 B/op 19693 allocs/op +BenchmarkTasks/Loop10W1/10Ku-100t/ErrGroup-8 2 756186484 ns/op 1322425 ops/s 40848400 B/op 2014723 allocs/op +BenchmarkTasks/Loop10W1/10Ku-100t/Gopool-8 2 228690928 ns/op 4372714 ops/s 33892292 B/op 512021 allocs/op +BenchmarkTasks/Loop10W1/10Ku-100t/GoroutinePool-8 2 302233938 ns/op 3308695 ops/s 852208 B/op 14759 allocs/op +BenchmarkTasks/Loop10W1/10Ku-100t/BufferedPool-8 2 41688358 ns/op 23987512 ops/s 8323848 B/op 10011 allocs/op +BenchmarkTasks/Loop10W1/10Ku-100t/Pond-8 2 697849504 ns/op 1432974 ops/s 337769144 B/op 6023022 allocs/op +BenchmarkTasks/Loop10W1/1Mu-1t/VarMQ-8 2 186925978 ns/op 5349711 ops/s 122387796 B/op 2003549 allocs/op +BenchmarkTasks/Loop10W1/1Mu-1t/Ants-8 2 1080688826 ns/op 925336 ops/s 72091412 B/op 1357969 allocs/op +BenchmarkTasks/Loop10W1/1Mu-1t/WorkerPool-8 2 801835456 ns/op 1247139 ops/s 101674824 B/op 1396897 allocs/op +BenchmarkTasks/Loop10W1/1Mu-1t/Conc-8 2 808271822 ns/op 1237208 ops/s 118526800 B/op 1772568 allocs/op +BenchmarkTasks/Loop10W1/1Mu-1t/ErrGroup-8 2 809042704 ns/op 1236029 ops/s 127551120 B/op 3458044 allocs/op +BenchmarkTasks/Loop10W1/1Mu-1t/Gopool-8 2 265658642 ns/op 3764229 ops/s 61867972 B/op 1399907 allocs/op +BenchmarkTasks/Loop10W1/1Mu-1t/GoroutinePool-8 2 444056656 ns/op 2251965 ops/s 77096392 B/op 1402654 allocs/op +BenchmarkTasks/Loop10W1/1Mu-1t/BufferedPool-8 2 195127348 ns/op 5124858 ops/s 40003848 B/op 1000011 allocs/op +BenchmarkTasks/Loop10W1/1Mu-1t/Pond-8 2 839715163 ns/op 1190880 ops/s 377255288 B/op 7087316 allocs/op +BenchmarkTasks/Loop10KW1/1u-1Mt/VarMQ-8 2 1136079126 ns/op 880220 ops/s 86092172 B/op 1002980 allocs/op +BenchmarkTasks/Loop10KW1/1u-1Mt/Ants-8 2 1786385619 ns/op 559790 ops/s 3508 B/op 42 allocs/op +BenchmarkTasks/Loop10KW1/1u-1Mt/WorkerPool-8 2 2165822248 ns/op 461718 ops/s 25175560 B/op 52 allocs/op +BenchmarkTasks/Loop10KW1/1u-1Mt/Conc-8 2 1661453602 ns/op 601883 ops/s 560 B/op 13 allocs/op +BenchmarkTasks/Loop10KW1/1u-1Mt/ErrGroup-8 2 1884278836 ns/op 530707 ops/s 40000352 B/op 2000009 allocs/op +BenchmarkTasks/Loop10KW1/1u-1Mt/Gopool-8 2 1026399292 ns/op 974280 ops/s 32435968 B/op 489176 allocs/op +BenchmarkTasks/Loop10KW1/1u-1Mt/GoroutinePool-8 2 1321717764 ns/op 756591 ops/s 464 B/op 12 allocs/op +BenchmarkTasks/Loop10KW1/1u-1Mt/BufferedPool-8 2 1024650612 ns/op 975942 ops/s 8003936 B/op 12 allocs/op +BenchmarkTasks/Loop10KW1/1u-1Mt/Pond-8 2 1405124524 ns/op 711681 ops/s 298373488 B/op 6005434 allocs/op +BenchmarkTasks/Loop10KW1/100u-10Kt/VarMQ-8 2 1114240092 ns/op 897473 ops/s 86151748 B/op 1003086 allocs/op +BenchmarkTasks/Loop10KW1/100u-10Kt/Ants-8 2 1804177998 ns/op 554269 ops/s 13676 B/op 203 allocs/op +BenchmarkTasks/Loop10KW1/100u-10Kt/WorkerPool-8 2 2409261609 ns/op 415065 ops/s 25182256 B/op 182 allocs/op +BenchmarkTasks/Loop10KW1/100u-10Kt/Conc-8 2 1577870024 ns/op 633766 ops/s 6416 B/op 136 allocs/op +BenchmarkTasks/Loop10KW1/100u-10Kt/ErrGroup-8 2 1773296609 ns/op 563921 ops/s 40003744 B/op 2000110 allocs/op +BenchmarkTasks/Loop10KW1/100u-10Kt/Gopool-8 2 1195277956 ns/op 836625 ops/s 32702532 B/op 497433 allocs/op +BenchmarkTasks/Loop10KW1/100u-10Kt/GoroutinePool-8 2 1306050022 ns/op 765667 ops/s 4080 B/op 115 allocs/op +BenchmarkTasks/Loop10KW1/100u-10Kt/BufferedPool-8 2 1028925191 ns/op 971888 ops/s 8007048 B/op 111 allocs/op +BenchmarkTasks/Loop10KW1/100u-10Kt/Pond-8 2 1617847602 ns/op 618105 ops/s 336836720 B/op 6008351 allocs/op +BenchmarkTasks/Loop10KW1/1Ku-1Kt/VarMQ-8 2 1112193196 ns/op 899124 ops/s 86180492 B/op 1003985 allocs/op +BenchmarkTasks/Loop10KW1/1Ku-1Kt/Ants-8 2 1708981906 ns/op 585144 ops/s 71540 B/op 1363 allocs/op +BenchmarkTasks/Loop10KW1/1Ku-1Kt/WorkerPool-8 2 2174416060 ns/op 459894 ops/s 25253168 B/op 1458 allocs/op +BenchmarkTasks/Loop10KW1/1Ku-1Kt/Conc-8 2 1609385728 ns/op 621355 ops/s 121960 B/op 1810 allocs/op +BenchmarkTasks/Loop10KW1/1Ku-1Kt/ErrGroup-8 2 1821729324 ns/op 548929 ops/s 40064576 B/op 2001296 allocs/op +BenchmarkTasks/Loop10KW1/1Ku-1Kt/Gopool-8 2 1217341078 ns/op 821462 ops/s 34963028 B/op 501221 allocs/op +BenchmarkTasks/Loop10KW1/1Ku-1Kt/GoroutinePool-8 2 1302601635 ns/op 767694 ops/s 58248 B/op 1242 allocs/op +BenchmarkTasks/Loop10KW1/1Ku-1Kt/BufferedPool-8 2 1027096485 ns/op 973618 ops/s 8035848 B/op 1011 allocs/op +BenchmarkTasks/Loop10KW1/1Ku-1Kt/Pond-8 2 1632226269 ns/op 612660 ops/s 337128240 B/op 6009663 allocs/op +BenchmarkTasks/Loop10KW1/10Ku-100t/VarMQ-8 2 1113643330 ns/op 897954 ops/s 86411972 B/op 1012978 allocs/op +BenchmarkTasks/Loop10KW1/10Ku-100t/Ants-8 2 2279506742 ns/op 438691 ops/s 849428 B/op 14737 allocs/op +BenchmarkTasks/Loop10KW1/10Ku-100t/WorkerPool-8 2 2388036854 ns/op 418754 ops/s 26049696 B/op 14999 allocs/op +BenchmarkTasks/Loop10KW1/10Ku-100t/Conc-8 2 1463519452 ns/op 683284 ops/s 1408944 B/op 19730 allocs/op +BenchmarkTasks/Loop10KW1/10Ku-100t/ErrGroup-8 2 2133526639 ns/op 468708 ops/s 40848512 B/op 2014724 allocs/op +BenchmarkTasks/Loop10KW1/10Ku-100t/Gopool-8 2 1215793532 ns/op 822508 ops/s 33342820 B/op 512070 allocs/op +BenchmarkTasks/Loop10KW1/10Ku-100t/GoroutinePool-8 2 1346604174 ns/op 742609 ops/s 848120 B/op 14723 allocs/op +BenchmarkTasks/Loop10KW1/10Ku-100t/BufferedPool-8 2 1026898320 ns/op 973806 ops/s 8323848 B/op 10011 allocs/op +BenchmarkTasks/Loop10KW1/10Ku-100t/Pond-8 2 1650692742 ns/op 605806 ops/s 337868920 B/op 6022946 allocs/op +BenchmarkTasks/Loop10KW1/1Mu-1t/VarMQ-8 2 1147388356 ns/op 871544 ops/s 121969652 B/op 2003494 allocs/op +BenchmarkTasks/Loop10KW1/1Mu-1t/Ants-8 2 2249001080 ns/op 444642 ops/s 80552956 B/op 1433518 allocs/op +BenchmarkTasks/Loop10KW1/1Mu-1t/WorkerPool-8 2 2774411575 ns/op 360437 ops/s 101746600 B/op 1398007 allocs/op +BenchmarkTasks/Loop10KW1/1Mu-1t/Conc-8 2 1748339260 ns/op 571971 ops/s 127898064 B/op 1856240 allocs/op +BenchmarkTasks/Loop10KW1/1Mu-1t/ErrGroup-8 2 2594001960 ns/op 385505 ops/s 141501128 B/op 3496967 allocs/op +BenchmarkTasks/Loop10KW1/1Mu-1t/Gopool-8 2 1179559142 ns/op 847774 ops/s 63949004 B/op 1473247 allocs/op +BenchmarkTasks/Loop10KW1/1Mu-1t/GoroutinePool-8 2 1538963694 ns/op 649788 ops/s 86746128 B/op 1478222 allocs/op +BenchmarkTasks/Loop10KW1/1Mu-1t/BufferedPool-8 2 1129673759 ns/op 885211 ops/s 40003848 B/op 1000011 allocs/op +BenchmarkTasks/Loop10KW1/1Mu-1t/Pond-8 2 1831325336 ns/op 546053 ops/s 378270736 B/op 7093962 allocs/op +PASS +ok github.com/goptics/benchmarks/pool 724.893s diff --git a/pool/benchmark_test.go b/pool/benchmark_test.go new file mode 100644 index 0000000..26370f2 --- /dev/null +++ b/pool/benchmark_test.go @@ -0,0 +1,59 @@ +package main + +import ( + "fmt" + "sync" + "testing" +) + +func BenchmarkTasks(b *testing.B) { + for _, size := range poolSizes { + for _, taskConfig := range size.tasks { + b.Run(fmt.Sprintf("%sW%s", taskConfig.Name, size.label()), func(b *testing.B) { + runBenchmarks(b, workloads, taskConfig.GenerateTask(), size.workers) + }) + } + } +} + +func runBenchmarks(b *testing.B, workloads []workload, task func(), maxWorkers int) { + for _, workload := range workloads { + for _, subject := range subjects { + testName := fmt.Sprintf("%s/%s", workload.name, subject.name) + + b.Run(testName, func(b *testing.B) { + for b.Loop() { + // Create pool + poolSubmit, poolTeardown := subject.factory(maxWorkers) + + // Spawn one goroutine per simulated user + var wg sync.WaitGroup + wg.Add(workload.userCount * workload.taskCount) + + testFunc := func() { + task() + wg.Done() + } + + for range workload.userCount { + go func() { + for range workload.taskCount { + poolSubmit(testFunc) + } + }() + } + wg.Wait() + + // Tear down + poolTeardown() + } + + totalOps := int64(workload.userCount) * int64(workload.taskCount) * int64(b.N) + elapsedSec := b.Elapsed().Seconds() + if elapsedSec > 0 { + b.ReportMetric(float64(totalOps)/elapsedSec, "ops/s") + } + }) + } + } +} diff --git a/pool/go.mod b/pool/go.mod new file mode 100644 index 0000000..24a2c5f --- /dev/null +++ b/pool/go.mod @@ -0,0 +1,23 @@ +module github.com/goptics/benchmarks/pool + +go 1.26.0 + +require ( + github.com/alitto/pond/v2 v2.7.2 + github.com/bytedance/gopkg v0.1.4 + github.com/gammazero/workerpool v1.2.2 + github.com/goptics/varmq v1.9.0 + github.com/panjf2000/ants/v2 v2.12.1 + github.com/sourcegraph/conc v0.3.0 + golang.org/x/sync v0.24.0 +) + +require ( + github.com/gammazero/deque v1.2.2 // indirect + go.uber.org/atomic v1.7.0 // indirect + go.uber.org/multierr v1.9.0 // indirect +) + +// replace github.com/goptics/varmq => ../varmq + +replace github.com/goptics/varmq => ../../varmq diff --git a/pool/go.sum b/pool/go.sum new file mode 100644 index 0000000..3dfa315 --- /dev/null +++ b/pool/go.sum @@ -0,0 +1,29 @@ +github.com/alitto/pond/v2 v2.7.2 h1:ZC5CQzWIQ17Oh5t6ocvBZGpve+gPeuNk0Vog/+MiJ5Y= +github.com/alitto/pond/v2 v2.7.2/go.mod h1:xkjYEgQ05RSpWdfSd1nM3OVv7TBhLdy7rMp3+2Nq+yE= +github.com/bytedance/gopkg v0.1.4 h1:oZnQwnX82KAIWb7033bEwtxvTqXcYMxDBaQxo5JJHWM= +github.com/bytedance/gopkg v0.1.4/go.mod h1:v1zWfPm21Fb+OsyXN2VAHdL6TBb2L88anLQgdyje6R4= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/gammazero/deque v1.2.2 h1:zD+4g/JzU5MdHWiPzMeG7OeFW5plbhYKqHfSNDnQ3E8= +github.com/gammazero/deque v1.2.2/go.mod h1:b0Hd32YGkBkCvq+lAX5i2bKhsBc9AJNZvv4vqNqsvJc= +github.com/gammazero/workerpool v1.2.2 h1:ThLMsRsi5tFu5A+yWQcDVUjAijYQUmv9sjmE/AtksVY= +github.com/gammazero/workerpool v1.2.2/go.mod h1:nbtgxeEYc+vZWZdZjYpHOyVwqXlStlplhfOf1bQu27s= +github.com/panjf2000/ants/v2 v2.12.1 h1:BWvU2wHpyXWxhhNXsGB6JXLCNbshyLd1QxvoAmZnu10= +github.com/panjf2000/ants/v2 v2.12.1/go.mod h1:tSQuaNQ6r6NRhPt+IZVUevvDyFMTs+eS4ztZc52uJTY= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= +go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= +golang.org/x/sync v0.24.0 h1:iqiDrGoDgyuvAKrhLQthUEzU/R378N78gXbBjxed7oA= +golang.org/x/sync v0.24.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/pool/subjects.go b/pool/subjects.go new file mode 100644 index 0000000..d9e3106 --- /dev/null +++ b/pool/subjects.go @@ -0,0 +1,173 @@ +package main + +import ( + "sync" + + "github.com/alitto/pond/v2" + "github.com/bytedance/gopkg/util/gopool" + "github.com/gammazero/workerpool" + "github.com/goptics/varmq" + "github.com/panjf2000/ants/v2" + "github.com/sourcegraph/conc/pool" + "golang.org/x/sync/errgroup" +) + +// Configuration + +var workloads = []workload{ + { + name: "1u-1Mt", // 1 user 1 million tasks each + userCount: 1, + taskCount: 10_00_000, + }, + { + name: "100u-10Kt", // 100 user 10 thousands tasks each + userCount: 100, + taskCount: 10000, + }, + { + name: "1Ku-1Kt", // 1 thousand users 1 thousand tasks + userCount: 1000, + taskCount: 1000, + }, + { + name: "10Ku-100t", // 10 thousands users 100 tasks each + userCount: 10000, + taskCount: 100, + }, + { + name: "1Mu-1t", // 1 million users 1 tasks each + userCount: 10_00_000, + taskCount: 1, + }, +} + +// Predefined task configurations +var taskConfigs = []TaskConfig{ + {Name: "Sleep10ms", SleepMs: 10, LoopSize: 0}, + {Name: "Loop10", SleepMs: 0, LoopSize: 10}, + {Name: "Sleep5msLoop5", SleepMs: 5, LoopSize: 5}, +} + +// serialTaskConfigs run on a pool of one worker. With one worker the pools +// differ only in what each costs per task (submit, hand-off, wake), so only +// CPU tasks run here: a sleeping task would measure time.Sleep, and one +// worker sleeping 10 ms per task needs almost three hours for 1M tasks. +var serialTaskConfigs = []TaskConfig{ + {Name: "Loop10", LoopSize: 10}, // a few ns of work: what remains is the pool's own cost + {Name: "Loop10K", LoopSize: 10_000}, // about 1 µs of work: how much the pool adds to a small real task +} + +// poolSizes are the pool sizes the matrix runs, each with the tasks worth +// running at that size. +var poolSizes = []poolSize{ + {workers: 50_000, tasks: taskConfigs}, + {workers: 100_000, tasks: taskConfigs}, + {workers: 300_000, tasks: taskConfigs}, + {workers: 1, tasks: serialTaskConfigs}, +} + +// subjects contains all the worker pool implementations to benchmark +var subjects = []subject{ + { + name: "VarMQ", + factory: func(maxWorkers int) (poolSubmit, poolTeardown) { + w := varmq.NewWorker(varmq.Func(), maxWorkers) + q := w.BindQueue() + + return func(task func()) { + q.Add(task) + }, func() { + w.WaitAndStop() + } + }, + }, + { + name: "Ants", + factory: func(maxWorkers int) (poolSubmit, poolTeardown) { + // Default options: Submit blocks while all maxWorkers goroutines are busy. + p, err := ants.NewPool(maxWorkers) + if err != nil { + panic(err) + } + + return func(t func()) { + _ = p.Submit(t) + }, p.Release + }, + }, + { + name: "WorkerPool", + factory: func(maxWorkers int) (poolSubmit, poolTeardown) { + p := workerpool.New(maxWorkers) + return p.Submit, p.StopWait + }, + }, + { + name: "Conc", + factory: func(maxWorkers int) (poolSubmit, poolTeardown) { + p := pool.New().WithMaxGoroutines(maxWorkers) + return p.Go, p.Wait + }, + }, + { + name: "ErrGroup", + factory: func(maxWorkers int) (poolSubmit, poolTeardown) { + // One goroutine per task behind a semaphore, not reused workers. + var g errgroup.Group + g.SetLimit(maxWorkers) + return func(t func()) { + g.Go(func() error { t(); return nil }) + }, func() { + _ = g.Wait() + } + }, + }, + { + name: "Gopool", + factory: func(maxWorkers int) (poolSubmit, poolTeardown) { + // Idle workers exit on their own and there is no Close, so teardown has nothing to do. + // Submit never blocks (unbounded task list), and the cap is soft: it can overshoot under contention. + p := gopool.NewPool("bench", int32(maxWorkers), gopool.NewConfig()) + return p.Go, func() {} + }, + }, + { + name: "GoroutinePool", + factory: func(maxWorkers int) (poolSubmit, poolTeardown) { + return chanPool(maxWorkers, 0) + }, + }, + { + name: "BufferedPool", + factory: func(maxWorkers int) (poolSubmit, poolTeardown) { + return chanPool(maxWorkers, 1_000_000) + }, + }, + { + name: "Pond", + factory: func(maxWorkers int) (poolSubmit, poolTeardown) { + p := pond.NewPool(maxWorkers) + return func(t func()) { + p.Submit(t) + }, p.StopAndWait + }, + }, +} + +// chanPool: N goroutines draining one task channel; buf=0 unbuffered, else buffered. +func chanPool(maxWorkers, buf int) (poolSubmit, poolTeardown) { + var wg sync.WaitGroup + taskChan := make(chan func(), buf) + for range maxWorkers { + wg.Go(func() { + for task := range taskChan { + task() + } + }) + } + return func(task func()) { taskChan <- task }, func() { + close(taskChan) + wg.Wait() + } +} diff --git a/pool/types.go b/pool/types.go new file mode 100644 index 0000000..e50f165 --- /dev/null +++ b/pool/types.go @@ -0,0 +1,62 @@ +package main + +import ( + "fmt" + "time" +) + +// Core benchmark types and interfaces +type poolSubmit func(func()) +type poolTeardown func() +type poolFactory func(maxWorkers int) (poolSubmit, poolTeardown) + +type subject struct { + name string + factory poolFactory +} + +// poolSize is one pool size of the matrix and the tasks it runs. +type poolSize struct { + workers int + tasks []TaskConfig +} + +// label names the size in benchmark names, after a "W": "50K" for 50,000, +// "1" for 1, in the style of the workload names (100u-10Kt). +func (p poolSize) label() string { + if p.workers >= 1_000 && p.workers%1_000 == 0 { + return fmt.Sprintf("%dK", p.workers/1_000) + } + + return fmt.Sprint(p.workers) +} + +type workload struct { + name string + userCount int + taskCount int +} + +// TaskConfig defines a benchmark task with configurable sleep and loop parameters +type TaskConfig struct { + Name string // Name of the task configuration + SleepMs int // Sleep duration in milliseconds + LoopSize int // Number of iterations for the loop +} + +// GenerateTask creates a task function based on the configuration +func (tc TaskConfig) GenerateTask() func() { + return func() { + // Execute the loop if configured + if tc.LoopSize > 0 { + for i := range tc.LoopSize { + _ = i * i + } + } + + // Sleep if configured + if tc.SleepMs > 0 { + time.Sleep(time.Duration(tc.SleepMs) * time.Millisecond) + } + } +} diff --git a/redis/README.md b/redis/README.md new file mode 100644 index 0000000..8fe2d2a --- /dev/null +++ b/redis/README.md @@ -0,0 +1,705 @@ +# Redis queue benchmarks + +Benchmarks for Redis-backed job queues: VarMQ's persistent and distributed +queues against Asynq, rmq, taskq and gocraft/work. It lives in its own Go +module so the other libraries' dependencies (some pull in go-redis v8) stay out +of the other modules. + +## Run + +```sh +task redis:up # Redis 7.2 (Debian image) on localhost:6390, pinned to CPU 14, no volume +task redis:test # smoke tests +task redis:bench # every benchmark once (-benchtime=1x) +task redis:txt # full run into bench/redis.txt (hours) +task redis:down +``` + +`task redis:txt` runs the client with `taskset -c 0-13,16-23`, so Redis keeps +core 14 and its sibling thread to itself. Compare runs on this setup only: the +alpine image, unpinned, measured about 2.5x lower on the same code. + +Set `REDIS_URL` to use another Redis (default `redis://localhost:6390/0`). The +tests and benchmarks skip when it isn't reachable. `FLUSHDB` runs before every +iteration, so don't point it at a Redis you care about. + +## Dimensions + +- Workloads: `1u-100Kt` (1 producer x 100,000 jobs), `100u-1Kt` (100 x 1,000) +- Workers per instance: 10, 100, 1000. Instances: 1, 4 (VarMQ's persistent + queue supports 1 only, so it has no `C4` rows) +- Tasks: `Noop`, `Sleep1ms` +- Names: `BenchmarkDurable/WC//`, + `BenchmarkEnqueue/Enqueue//`, + `BenchmarkLatency/LatencyW10C1/1u-1Kt/` +- Metrics: `jobs/s` (Durable, Enqueue); `p50-ms`, `p99-ms`, `max-ms` (Latency) + +Each subject runs at its library defaults, apart from worker concurrency and +the Redis pool size (`max(workers, 10*GOMAXPROCS)`, where the library lets us +set it). Anything else a library forces us to choose is listed under +"Forced settings". + +The Enqueue and Latency names carry an extra segment: they were +`BenchmarkEnqueue//` and `BenchmarkLatency/NoopW10C1/...`. +The dashboard's group pattern needs three segments after the function name, and +the old Latency name collided with the `NoopW10C1` end-to-end group. + +## Datasets on the site + +- Redis (Persistent): the `C1` rows of `BenchmarkDurable`, plus Enqueue and + Latency, for VarMQ, Asynq, Rmq, Taskq and GocraftWork. VarMQ's persistent + queue is single-instance, so it only races at one consumer process. +- Redis (Distributed): the `C4` rows, four consumer processes, VarMQDistributed + included. + +Latency is folded into the persistent dataset, so its group shows an empty +`jobs/s` card, and the end-to-end groups show empty `p50-ms`, `p99-ms` and +`max-ms` cards. Those are expected. + +Adding a subject: also add it to `SUBJECTS` in the root Taskfile, or the +persistent dataset drops it. + +## Results + +`bench/redis.txt` is one full run from 2026-10-24: varmq 415ad73 (unreleased, +through the `replace` directive in `go.mod`), redisq v1.5.0, `-benchtime=2x`, +Redis 7.2 (Debian image) pinned to CPU 14, the client on the other cores as +`task redis:txt` sets up. 150 rows: 132 `BenchmarkDurable` (2 tasks x 3 worker +counts x 2 workloads x 11 subject and instance shapes), 12 `BenchmarkEnqueue`, +6 `BenchmarkLatency`. No row failed and no run stalled. jobs/s, higher is +better. + +End to end, one instance (`C1`, VarMQ persistent against the four +libraries): VarMQ is first in 4 of 12 rows, all with 100 producers +(`100u-1Kt` at W100 and W1000, 60.6k and 59.2k against GocraftWork's 45.1k and +40.7k). With a single producer (`1u-100Kt`) GocraftWork leads every row at +about 25k and VarMQ is second at about 21k; those rows are bound by the one +producer's enqueue round trip. Against Asynq and Taskq, VarMQ is ahead in every +row: 1.1 to 1.4x with one producer, 2 to 3x with 100. + +End to end, four instances (`C4`, VarMQDistributed): first in 6 of 12 rows, +every `100u-1Kt` row, by 1.3 to 2.1x over the best rival (55k to 66k against +GocraftWork's 33k to 49k). With a single producer GocraftWork or Rmq lead and +VarMQDistributed sits at 0.80 to 0.90x of the best. + +`Sleep1ms` at W10 is bound by 10 workers x 1 ms, so every subject lands near +5k to 6k there. + +Enqueue only (`BenchmarkEnqueue`): VarMQ 42.9k at one producer, the best of +the six; at 100 producers Rmq, GocraftWork and VarMQ tie near 201k to 202k and +VarMQDistributed trails at 143k, the cost of its wake script per enqueue. + +Pickup latency (`BenchmarkLatency`, 1,000 jobs one at a time, ms): + +| Subject | p50 | p99 | max | +|---|---|---|---| +| Taskq | 0.063 | 0.190 | 0.61 | +| GocraftWork | 0.092 | 0.474 | 10.80 | +| VarMQ | 0.142 | 0.384 | 3.58 | +| VarMQDistributed | 0.146 | 0.541 | 2.18 | +| Rmq | 102.2 | 112.3 | 113.3 | +| Asynq | 995.3 | 1492.0 | 1507.0 | + +Rmq's 100 ms poll and Asynq's 0.5 to 1.5 s idle sleep show directly. VarMQ's +batch pop costs about 0.05 ms over Taskq's blocking `XREADGROUP` at p50. + +In `C4` rows the 4 consumer instances are stopped one after another inside the +timed region, so subjects whose stop waits out an idle poll (Asynq about +0.5 to 1.5 s, Taskq up to 1 s per instance) pay that up to 4 times; a later run +will stop them concurrently. + +A `Sleep1msW1000C4/1u-100Kt/VarMQDistributed` row stalled in an earlier full +run on redisq v1.4.0, described under "Known issue" in the VarMQDistributed +section. This run completed that row (and every other) on v1.5.0. + +## Work per job + +Each row of the work table is read from the library source. The notes per subject +come first and cite the file and function for each claim; the table is last, so +a new row is added at the end of the file. + +### VarMQ (persistent) + +Library versions `varmq 415ad73` (unreleased, `replace` directive) and +`redisq v1.5.0`. + +- Dequeue: `bind` (`varmq/source.go`) sees that `*redisq.Queue` implements + `IBatchAcknowledgeable` (`varmq/interface.go`; `DequeueBatchWithAckIds` in + `redisq/queue.go`), so the worker's source is a `batchAckSource` and its + manager a `creditManager` (`varmq/source_manager.go`). On every wake the + event loop (`goEventLoop`, `varmq/worker_eventloop.go`) runs + `dispatchCredit` (`varmq/worker_credit.go`), which asks the source for + `min(free workers, maxCredit)` jobs, with `maxCredit` 64 and free workers + `concurrency - busyWorkers`, in one `batchAckSource.fetch`, which is one + `DequeueBatchWithAckIds` call. It pops nothing when the hint is dry or no + worker is free. `dequeueBatch` (`redisq/queue.go`) runs one Lua script + with `EVALSHA` (`Script.Run` in `go-redis/v9/script.go`, `EVAL` once on + `NOSCRIPT`): `listAckPop` when it wants 2 or more items (`HMGET` of the + reservation's ack ids as a re-send guard, `LRANGE`+`LTRIM`, `HSET` on + `bench:nacked`, `ZADD` on `bench:timeouts` with a deadline from Redis + `TIME`, `ZADD` on `bench:heartbeats`, `LLEN` for the reply), or the leaner + `listAckPopOneLen` (`HGET` guard, `LPOP`, `HSET`, `ZADD`, `ZADD`, `LLEN`) + when it wants one. How many it wants is `min(free workers, 64, popLen)` + capped at `maxPop` 1000: redisq sizes each call by what the last one left + in the queue or, once the queue emptied, by the run taken since it was + last seen empty (`popLen` and `popRun` in `dequeueBatch`), so 64 is the + cap that binds here. Each popped job goes straight to its own pool goroutine + (`node.Value.Send` in `dispatchCredit`); nothing is buffered. One pop is + in flight at a time per worker, since the event loop runs `dispatchCredit` + serially; acks run from the pool goroutines concurrently. A pop that + comes up short, or a full one that empties the queue, marks the source dry + (`fetch`, `varmq/source.go`), and the next `Add` or resync pokes it. +- Enqueue: `persistentQueue.Add` (`varmq/persistent.go`) calls `enqueue` + (`varmq/interface.go`), which takes the plain `Enqueue` path because the + default `jobIdGenerator` returns `""` (`defaultConfig`, `varmq/config.go`), + so `EnqueueOnce` and the dedup window are never used. `Queue.Enqueue` + (`redisq/queue.go`) is one `RPUSH`, not a pipeline: the queue expiration + is 0. `Add` then pokes the source's ready hint and signals the event loop + (`poke`, `notifyToPullNextJobs`). +- Ack: `job.closeOnce` calls `job.acknowledge` (`varmq/job.go`), which calls + `Queue.Acknowledge` (`redisq/queue.go`): one `HDEL`+`ZREM` pipeline, 1 + round trip per job, run by the pool goroutine right after the handler + returns (`initPoolNode`, `varmq/worker_pool.go`). The ack runs synchronously + in that goroutine, and the worker slot is freed only after it returns + (`busyWorkers` decremented, then `finishJobs` and `notifyToPullNextJobs`), + which is why the next pop's size tracks completions. Acks are not batched. + The ack id is `::`, the prefix 128 random bits + per `Queue` object (`newID`, `ackIDOf`). +- Wake: in process, no polling on the hot path. `Add` pokes and signals, + `Start` (`varmq/worker_lifecycle.go`) signals, `bind` signals once when + the queue is bound, and a pool goroutine signals after each job + (`initPoolNode`). The signal is a non-blocking send on a channel of capacity + 1 (`notifyToPullNextJobs`, `eventLoopSignalCap` in `varmq/worker.go`), so + signals coalesce. No per-job `LLEN`: `creditManager.Len` returns the ready + hint (`batchAckSource.ready`, no I/O), and the credit branch of the event + loop never calls `worker.pending`. +- No mutex across Redis calls on the hot path: the v1.5.0 `Queue` keeps its + config in atomics (the `Queue` struct, `redisq/queue.go`) and holds no + lock around a command, script or pipeline, so adds, pops and acks from + many goroutines run concurrently. The Redis calls under a lock are at + Close only: varmq's `Wait` (`varmq/worker_wait.go`) holds `w.mx` while + `NumPending` runs its `LLEN`, and `Queue.Close` runs `releaseScript` + inside its `closeOnce` `sync.Once` (`redisq/queue.go`). +- Idle wait: when the source is dry it arms a 1 s resync (`markDry`, + `armResync`, `resync` in `varmq/source.go`): one `Queue.Len` (`LLEN`) per + second while the worker is active, the hint is dry and this is its only + source; it pokes if items wait. That is how a second process's adds would + be found, up to 1 s late; the harness keeps this subject at 1 instance, + where the producer is the consumer's own `Add` (`varmqConsumer`, + `redis/varmq.go`). +- Round trips per job, consumer side: 1 ack pipeline per job plus 1 pop + script per k jobs, where k is the free slots at each wake, at most + `min(workers, 64)` and further limited by `popLen`. The first pass, with + every worker idle, asks for the full credit (up to 10 at W10, up to 64 at + W100 and W1000) and pops what is queued, one or a few jobs with the `1u` + workload; later passes ask for what finished since the last one, because + signals coalesce and a slot is freed only after the handler and its ack + return (`dispatchCredit`, `initPoolNode`). On `Sleep1ms` at W10 k is + likely nearer 1 than 10, an estimate that assumes pop and ack round-trip + times, not only the code; with a trickle k is 1, 2 round trips per job. + Not measured. Producer side: 1 per job (`RPUSH`). Not per job: the background + work below. +- Not per job: `newQueue` (`redisq/queue.go`) runs `RequeueNackedItems` + once and starts `sweep`, one `tickScript` per second per `Queue` object, + which requeues items past their visibility deadline, renews this object's + heartbeat and requeues the items of owners whose heartbeat ran out + (`tickBody`). It also calls `PUBSUB NUMSUB` for each live owner's wake + channel and ignores the result here, since only a distributed owner has a + presence row. In the end-to-end runs the producer is the consumer's own + `Queue` object (`varmqConsumer`, `redis/varmq.go`), so one sweep runs; + `BenchmarkEnqueue`'s producer (`varmqProducer`) is a separate object with + its own. Heartbeats are on by default: `SetHeartbeatTimeout` defaults to + 30 s (`newQueueBase`), and each pop that hands out items beats inside its + script (`beatFn`), so no extra round trip. The adapter sets neither the + heartbeat nor the visibility timeout, which stays at 5 min (`newQueueBase`). +- Pool size: `redisq.New` (`redisq/queues.go`) parses the URL with + `redis.ParseURL`, which reads `pool_size` (`setupConnParams`, + `go-redis/v9/options.go`), so the adapter appends it with `withPoolSize` + (`redis/types.go`). `New` also sets a 3 s read timeout and a 512 ms max + retry backoff unless the URL sets them, and one dial attempt, which a URL + cannot change (`DialerRetries`). The ack pipelines go through go-redis's + separate pipeline pool, up to 10 at a time (`DefaultPipelinePoolSize`, + `go-redis/v9/options.go`); the rest spill to the main pool + (`withPipelineConn`, `go-redis/v9/redis.go`), so with more than 10 acks + in flight, as at W100 and W1000, the others run on `pool_size` connections. + `pipeline_pool_size` is a URL option the adapter does not set. +- Batch size: `maxCredit` is 64 (`varmq/worker_credit.go`), the most jobs + one pop takes. `ackSource.maxBatch` stays 1 (`varmq/source.go`); it only + applies to the classic loop that drains jobs parked by a stop or pause. +- Serialization: `job.Json` (`varmq/job.go`) marshals `{id, status, data}` + with the payload as `data` (`id` is empty here); the consumer parses it + back in `toJob` (`varmq/source.go`). +- Close: the adapter calls `WaitAndStop` (`varmq/worker_wait.go`), which + polls `NumPending` (`varmq/worker.go`; one `LLEN` per check, re-checked + every 10 ms while nothing runs, `waitRecheck`) until the queue and the + processing count are 0, then `Stop`. `Queue.Close` (`redisq/queue.go`) + then cancels the sweep and runs `releaseScript` once if the object ever + popped: an `HKEYS` scan of `bench:nacked` that requeues this object's + un-acked items and drops its heartbeat (`releaseBody`, 3 s timeout). After + `Wait` it finds nothing to move. +- Logging: varmq prints nothing (its default error handler is a no-op, + `varmq/config.go`). `redisq` logs through the std `log` package; `TestMain` + discards it. + +### Asynq + +Library version `asynq v0.26.0`. Paths are inside the module (`go env GOMODCACHE`). + +- Dequeue: `processor.exec` (`processor.go`) calls `RDB.Dequeue` + (`internal/rdb/rdb.go`), which runs `dequeueCmd`, a Lua script, with + `EVALSHA` (falling back to `EVAL` on `NOSCRIPT`, `Script.Run` in + `go-redis/v9/script.go`). Keys: `asynq:{bench}:pending`, `:paused`, `:active`, + `:lease`. The script checks `EXISTS` on the paused key, `RPOPLPUSH` pending to + active, `HSET`+`HDEL` on the task hash `asynq:{bench}:t:`, `ZADD` on the + lease zset, then `HGET`s the message. Enqueue is `RDB.Enqueue`: one + `enqueueCmd` script (`EXISTS`, `HSET`, `LPUSH`), plus one `SADD` of the queue + name on a client's first enqueue (`Client.EnqueueContext`, `client.go`). +- Dequeue concurrency: one goroutine (`processor.start`) loops `exec`, so one + `Dequeue` is in flight per server. The handler and its ack run in a goroutine + per task, up to `Concurrency` (the `sema` channel). +- Ack: a handler that returns nil goes to `processor.handleSucceededMessage`. + `Retention` is 0 unless the caller sets it (`composeOptions`, `client.go`), + so it calls `markAsDone` and `RDB.Done`: one `doneCmd` script (`LREM` active, + `ZREM` lease, `DEL` task hash, `INCR` the daily processed counter plus + `EXPIREAT` on its first hit, `GET` then `INCR`/`SET` of the total). Completed + tasks are not kept. +- Wake: none. Polling only. The comment in `processor.exec` says it polls the + queues instead of using a blocking pop. An empty + `Dequeue` makes the processor sleep. Pub/sub exists (`subscriber.go`, + `RDB.CancelationPubSub`), but its use here is task cancelation, not job wake + (read from the file name and calls; not traced further). +- Idle wait: when `Dequeue` returns `ErrNoProcessableTask`, `processor.exec` + runs `time.Sleep(taskCheckInterval/2 + rand.N(taskCheckInterval))`. + `TaskCheckInterval` defaults to 1 s (`defaultTaskCheckInterval`, + `server.go`; `NewServerFromRedisClient`), so each idle sleep is uniform in + [0.5 s, 1.5 s). The sleep is not interruptible and holds a worker token. + Jobs enqueued during it wait it out. Measured in a separate 40-job probe, not + the `Latency` benchmark: median enqueue-to-handled latency about 990 ms and + max 1.4 s over 40 sequential jobs, so the `Latency` benchmark runs 1,000 + jobs, one at a time, for every subject: Asynq's default idle poll would make + a 10,000-job paced run take about 2.75 hours per iteration. +- Shutdown: `Server.Shutdown` (`server.go`) calls `processor.shutdown`, whose + `stop` does `p.done <- struct{}{}`. That send is received only after the + processor goroutine finishes its current `exec`, including the sleep above. + So an idle `Shutdown` inside the timed region blocks for the rest of a + 0.5 to 1.5 s sleep. Measured on an idle server: 41 ms, 296 ms, 432 ms, + 795 ms, 1.07 s over 5 runs; 6 ms when stopped right after `Start`. The + 8 s `ShutdownTimeout` (`defaultShutdownTimeout`) only bounds in-flight + handlers, and idle shutdown does not wait for it. We do not tune either. +- Round trips per job, consumer side: 2 (`Dequeue` script, `Done` script). + Not per job: `heartbeater.beat` (`heartbeat.go`) writes server state and + extends leases for active tasks every 5 s. Producer side: 1 per job (one + `EVALSHA`), plus 1 `SADD` per client. +- Serialization: `base.EncodeMessage` (`internal/base/base.go`) marshals a + protobuf `TaskMessage` (`internal/proto/asynq.proto`) carrying type, payload + (our JSON bytes), id (UUID), queue, retry, timeout and the other fields. It + is stored in the task hash field `msg`; the pending list holds only the id. +- Pool size: `RedisClientOpt.PoolSize` goes to `redis.Options.PoolSize` + (`asynq.go`, `MakeRedisClient`). The server uses one pool for the processor, + heartbeater and the other background jobs. The adapter sets `poolSize(workers)` + on the server and on the client; the client passes 0 workers, which gives + `10*GOMAXPROCS`, the go-redis default. +- Forced settings: queue `bench` with priority 1 (`Config.Queues`; asynq falls + back to a `default` queue if none is set, `NewServerFromRedisClient`), + `Concurrency = workers`, `Logger` no-op and `LogLevel = FatalLevel`. Task + options are the defaults: `MaxRetry` 25 and `Timeout` 30 min (`client.go`), + lease 30 s (`rdb.LeaseDuration`), no `Retention`, no unique key. +- Logging: `internal/log` writes to stderr when no logger is set + (`NewLogger`). The adapter passes a no-op `asynq.Logger`. Nothing else in + the library's non-test code prints to stdout or stderr: no startup banner, + and the only std `log.Printf` is a bad-call path in `internal/errors`, which + `TestMain` discards. + +### VarMQDistributed + +Library versions `varmq 415ad73` (unreleased, `replace` directive) and +`redisq v1.5.0`. + +- Dequeue and ack: the same credit path as VarMQ (persistent). + `redisq.DistributedQueue` embeds `*Queue` (`redisq/distributed.go`) and + its own `DequeueBatchWithAckIds` passes the consumer id to the same + `dequeueBatch` scripts (`redisq/queue.go`), so `dispatchCredit` + (`varmq/worker_credit.go`) pops up to `min(free workers, 64)` jobs per + script, sized by `popLen`, and each job is acked with one `HDEL`+`ZREM` + pipeline (`job.acknowledge` in `varmq/job.go`, `Queue.Acknowledge`). With + a consumer id the pop script also joins the idle set in the same step: + `reply` in `popHead` runs `SADD bench:idle ` when the queue is empty + after the pop and the pop took fewer items than the caller had slots. + varmq's `fetch` (`varmq/source.go`) treats a full pop as not dry for a + subscribed source, so a full pop that empties the queue is followed by + one more pop, which returns nothing and joins the idle set. +- No mutex across Redis calls, and the ack synchronous in the pool goroutine + before the slot is freed: as for VarMQ (persistent), with one `redisq.Queue` + per instance. +- Enqueue: `distributedQueue.Add` (`varmq/distributed.go`) calls `enqueue` + (`varmq/interface.go`), the plain path as for VarMQ (no job id), so + `DistributedQueue.Enqueue` (`redisq/distributed.go`) runs one `listPushWake` + script: `RPUSH`, then `wake` (`wakeFn`, `redisq/notification.go`), which + `SPOP`s `bench:idle` and `PUBLISH`es `enqueued` on `bench:wake:`, up to + once per waiting item, stopping when the set runs out; an id whose `PUBLISH` + reaches no subscriber does not count. One round trip per job whatever it + wakes. `Notification.Send` and the shared `bench:notifications` broadcast + are gone in v1.5.0. +- Wake: push to one consumer per item, plus a nudge. `newDistributedQueue` + (`redisq/distributed.go`) builds the `Notification`, whose constructor + calls `Client.Subscribe` on `bench:wake:` (`newNotification`) + and whose `Start` runs the forwarding goroutine (`PubSub.Channel`) and + `nudgeLoop`. `WithDistributedQueue` (`varmq/worker_binder.go`) binds the + queue as a `batchAckSource`, which signals the event loop once at bind + (`bind`, `varmq/source.go`), then `subscribe` marks the source subscribed + and registers a handler that pokes the ready hint and calls + `handleQueueSubscription`, a non-blocking signal to the event loop + (`notifyToPullNextJobs`, `varmq/worker_eventloop.go`). + `Notification.Subscribe` makes the instance a consumer and `SADD`s it to + the idle set (`markIdle`). A `PUBLISH` reaches one idle consumer, not + every instance. A job finishing signals the event loop as for VarMQ. Once + a second `nudgeLoop` runs the `nudge` script (`LLEN`, then `SREM` of this + consumer from the idle set if items wait, else `SADD` if its own last + look found nothing) and, when items wait, delivers `enqueued` to the + handlers itself, so a lost wake costs at most about 1 s. The sweep and + `Close` of a distributed queue wake up to one idle consumer per item they + requeue (`setOnRequeue(q.wake)`, `wakeIdle`). There is no resync timer: + `armResync` (`varmq/source.go`) returns at once for a subscribed source. + The go-redis pub/sub channel health check still sends a `PING` on the + pub/sub connection when no message has arrived for 3 s (`newChannel`, + `initHealthCheck` in `go-redis/v9/pubsub.go`; ping timeout 5 s, reconnect + timeout 10 s). It has no effect on job pickup. +- Start-up: `Client.Subscribe` (`go-redis/v9/redis.go`) writes `SUBSCRIBE` + on the pub/sub connection before it returns (`PubSub.subscribe` and + `_subscribe` call `writeCmd` and do not read the reply), so the `SUBSCRIBE` + has been written when `NewDistributedQueue` returns, though go-redis does + not wait for Redis to confirm it. `NewWorker` starts the worker + (`WithAutoRun` default) before `WithDistributedQueue` binds the queue; the + bind signals a first pop, `Subscribe` joins the idle set, and jobs already + waiting are found by that pop or by the nudge. That first pop can run before + `Subscribe` sets the consumer id, in which case it does not join the idle set + in-script (`Subscribe` does right after) and, if it comes up short, arms one + 1 s resync (`armResync`): it fires once, runs one `lenIdle` script if the + hint is still dry (`resync`), and is not re-armed, since the source is + subscribed by then. +- No `Listen` is needed: `Queue.Listen` (`redisq/queue.go`) only waits for + SIGINT or SIGTERM. The adapter does not call it. +- Round trips per job, consumer side: 1 ack pipeline per job plus 1 pop + script per k jobs, k as for VarMQ (persistent). Producer side: 1 script + per job (`RPUSH` plus the wakes inside it). +- Not per job: per consumer, the `nudge` script once a second; per `Queue` + object (the producer's included), the `sweep` script once a second + (`tickScript`). In both subjects the sweep counts the subscribers of each + live owner's wake channel with `PUBSUB NUMSUB`; only a distributed owner + has a presence row, so only it can be taken for gone after 5 s without a + subscriber (`tickBody`, `presenceGrace`). The producer's `Notification` + subscribes to its own wake channel too, but its nudge loop does nothing, + since the producer never calls `Subscribe` (`consumer` stays false). + Heartbeat timeout 30 s, visibility timeout 5 min and dedup window 5 min + stay at their defaults (`newQueueBase`). Each pop that hands out items + beats inside its script, as for VarMQ. +- Pool size: `redisq.New` parses `pool_size` from the URL, as for VarMQ + (persistent). The producer keeps `poolSize(0)`, which is `10*GOMAXPROCS`. + The pub/sub connection comes from go-redis's separate pub/sub pool + (`Client.pubSub` in `go-redis/v9/redis.go`), so it never counts against + `pool_size`. The ack pipelines use its pipeline pool, up to 10 at a time + (`DefaultPipelinePoolSize`, `go-redis/v9/options.go`); the rest spill to + the main pool (`withPipelineConn`, `go-redis/v9/redis.go`), as for VarMQ. +- Close: the consumer calls `WaitAndStop` first (its `NumPending` runs the + `lenIdle` script per check: `LLEN`, plus `SADD` to the idle set when 0), + then `DistributedQueue.Close` (`redisq/distributed.go`): `leave` (`SREM` + from the idle set), `Queue.Close` (cancel the sweep, `releaseScript` once + if the object ever popped) and `Notification.Stop` (`SREM` again, cancel + the nudge loop, close the pub/sub). Then the client. +- Serialization: as for VarMQ (persistent). +- Logging: `Notification` and `Queue` use the std `log`, which `TestMain` + discards. + +- Known issue (observed on redisq v1.4.0, not rerun on v1.5.0): the row + `Sleep1msW1000C4/1u-100Kt/VarMQDistributed` (4 instances x 1000 workers, + `Sleep1ms`, 1 producer x 100,000 jobs) stalled with 99,819/100,000 jobs + handled, 0 duplicates, until the harness's 5-minute limit (`runEndToEnd`) + failed it. That happened in an earlier full run on redisq v1.4.0 that is not + committed; `bench/redis.txt` is regenerated at the v1.10.0 run. The stall is + intermittent: an isolated rerun of 1 iteration passed, an isolated rerun of 8 + iterations stalled the same way, and isolated reruns of 10 and 40 iterations + passed. The cause is not diagnosed (Redis was not inspected during a stall). + On v1.4.0 an idle instance was woken only by a later `enqueued` broadcast, so + a missed wake-up was the suspect, unverified; v1.5.0 replaced that broadcast + with the per-consumer wake channels and the 1 s nudge above, so that + mechanism no longer exists. The v1.4.0 start-up probes (5 pre-filled jobs + drained in 150 of 150 rounds, `TestSubjects` at 4 instances passing 30 runs + in a row) were measured against that broadcast too and have not been rerun. + `go test` carried on after the FAIL and completed + `Sleep1msW1000C4/1u-100Kt/Rmq`, then the run was stopped by hand, so that run + has no VarMQDistributed `Sleep1msW1000C4/1u-100Kt` numbers, and no + `Sleep1msW1000C4/100u-1Kt` rows for any subject. Treat them as unavailable + until the v1.5.0 run shows otherwise. + +### Rmq + +Library version `rmq/v5 v5.2.0`. Paths are inside the module (`go env GOMODCACHE`). +The adapter opens one `rmq.OpenConnectionWithRedisClient` connection per +consumer instance and one for the producer, each on its own go-redis v9 +client. + +- Enqueue: `Queue.Publish` (`queue.go`) calls `RedisWrapper.LPush` + (`redis_wrapper.go`): one `LPUSH` of the payload onto + `rmq::queue::[bench]::ready`. One round trip per job. The producer's + `Publish` takes no lock of its own. +- Fetch: `StartConsuming` (`queue.go`) starts one goroutine, `redisQueue.consume`, + per queue. Each pass runs `consumeBatch`: one `LLEN` of this connection's + unacked list (`unackedCount`), then, for `prefetchLimit - unacked` deliveries, + one `RPOPLPUSH` ready to `rmq::connection::::queue::[bench]::unacked` + per delivery (`RedisWrapper.RPopLPush`, not pipelined), each pushed into a + channel of size `prefetchLimit`. An empty list ends the pass. +- Ack: `redisDelivery.Ack` (`delivery.go`) runs one `LREM unacked 1 ` + per job, one round trip. Nothing else is written per job. An ack that finds + nothing to remove returns `ErrorNotFound`; the adapter ignores it. +- Round trips per job, consumer side: 2 (`RPOPLPUSH` and `LREM`), plus one + `LLEN` per fetch pass, plus one `RPOPLPUSH` that returns nil when a pass + drains the list. +- Wake and idle wait: polling only, no blocking pop and no push. + `consume` calls `time.Sleep(jitteredDuration(pollDuration))` after every pass, + including a pass that fetched jobs, not only an empty one. `jitteredDuration` + (`queue.go`) is +/-10%, so 90 to 110 ms at our 100 ms. No back-off was found in + `consume`: the sleep is the same on an empty queue. Redis errors only add an + `errChan` send. +- Throughput cap: `consume` sleeps after every pass and a pass fetches at most + `prefetchLimit - unacked` deliveries (`consumeBatch`), so one connection moves + at most about `prefetchLimit / pollDuration` jobs per second: 1000 / 0.1 s = + 10,000 jobs/s per instance at `workers <= 500` (about 11,000 at the shortest + jittered sleep of 0.09 s), and `2*workers / 0.1 s` above that. The cap is + derived from the code, not measured. A pass also costs one serial + `RPOPLPUSH` per delivery, which may bind before the cap. +- Heartbeat: `openConnection` (`connection.go`) starts a goroutine that runs + `SET rmq::connection::::heartbeat 1` with a 1 minute TTL every second + (`heartbeatInterval`, `heartbeatDuration`). It is per connection, not per + job. `openConnection` also runs `SADD rmq::connections`, `OpenQueue` runs + `SADD rmq::queues`, `StartConsuming` runs one `SADD` for the connection's + queue set, and each `AddConsumerFunc` (`addConsumer`) runs one `SADD`, serially. At 1000 workers that is + 1000 setup round trips, inside the timed region. +- Cleaner: `NewCleaner` (`cleaner.go`) has no caller inside rmq, so no cleaner + runs unless the application starts one. The adapter does not. Unacked + deliveries left by a stopped connection stay in its unacked list. +- Tag: `openConnection` names the connection `-`, so the tag + `bench` need not be unique. Consumers get `-` too. +- Stop: `StopAllConsuming` (`connection.go`) calls `Queue.StopConsuming` for + each opened queue. Its channel closes after `stopWg.Wait`, which waits for + every consumer goroutine, but not for the fetch goroutine or the heartbeat + goroutine. The fetch goroutine exits at its next check, so it can run up to + one sleep longer; the adapter closes the go-redis client right after, so + anything it still sends fails. `TestRmqStopEndsPollers` checks that the + fetch and consumer goroutines end. rmq has no exported way to stop the + heartbeat goroutine (`stopHeartbeat` is unexported). After the client closes, + its `SET` fails once a second, and at `HeartbeatErrorLimit` (45) it sends one + blocking error to `errChan` and exits. The adapter gives `errChan` a + buffer of 1024 so that send completes with no reader. Net effect: each + stopped connection leaves one idle goroutine for about 45 s. +- Serialization: `Publish` takes `...string` (`queue.go`), so the adapter sends + `string(payload.marshal())`, the same JSON bytes as the other subjects. + `newDelivery` calls `ExtractHeaderAndPayload` (`header.go`), which only + strips a header when the payload starts with the signature `\xFF\x00\xBE\xBEJ`. + Our JSON starts with `{`, so it passes through. +- Pool size: with `OpenConnectionWithRedisClient` rmq does not create the + client, so the adapter sets `PoolSize` on its own go-redis client: + `poolSize(workers)` per consumer instance, `poolSize(0)` for the producer. +- Logging: rmq does not log. Errors go to `errChan`, which a goroutine drains + until stop. + +### Taskq + +Library version `taskq/v3 v3.2.9`, redis backend `redisq` imported as +`taskqredis`, which uses go-redis **v8** (`github.com/go-redis/redis/v8 v8.11.5`) +rather than the v9 the other subjects use. Paths are inside the module (`go env +GOMODCACHE`). The adapter builds one go-redis v8 client, one `redisq` factory and +one queue named `bench` per consumer instance, and the same per producer. + +- Enqueue: `Queue.Add` (`redisq/queue.go`) calls `Queue.add`, which runs one + `XADD` on the stream `taskq:{bench}:stream` with a single field `body`. One + round trip per job, not pipelined. `add` also fills in a random UUID as the + message ID, unrelated to the stream entry ID. `isDuplicate` only touches Redis + when the message has a `Name`; ours has none. +- Serialization: `Message.MarshalBinary` (`message.go`) msgpack-encodes the + message (task name, args bytes, reserved count, ID). The args are + `msgpack.Marshal([]interface{}{payloadJSON})` (`Message.MarshalArgs`), so the + adapter's JSON bytes ride as one msgpack `bin` inside a msgpack message + inside the stream field. `MarshalBinary` compresses the args with s2 only at + 512 bytes or more; our JSON is about 140 bytes (computed, not measured on the + wire), so no compression applies. +- Fetch: `Consumer.fetchMessages` (`consumer.go`) calls `Queue.ReserveN`, which + runs `XREADGROUP GROUP taskq COUNT BLOCK + STREAMS taskq:{bench}:stream >`. `n` is `ReservationSize`. On `NOGROUP` it + runs `XGROUP CREATE ... MKSTREAM` from `0` and retries. +- Fetchers: with `MinNumWorker == MaxNumWorker`, `Consumer.Start` does not + start the autotuner (`consumer.go`, `Start`: it only runs when min < max). It + calls `replaceConfig` with `NumFetcher: 0`, and `ensureFetcher` + (called from `waitMessage`) then starts one fetcher, id 0. Nothing raises + the count afterwards, so each consumer instance has one fetcher, regardless + of worker count, feeding a buffered channel of `BufferSize` (default = + `ReservationSize`, 10). The fetcher takes up to 10 jobs per `XREADGROUP` + and blocks on the channel when it is full. +- Ack: `Consumer.Put` calls `Consumer.delete`, which calls `Queue.Delete` + (`redisq/queue.go`): `XACK` and then `XDEL`, two separate commands, two + round trips, run by the worker goroutine after the handler returns. The + handler always returns nil, because a returned error makes taskq `Release` + the message for a retry. +- Round trips per job: 2 consumer-side (`XACK`, `XDEL`) plus one `XREADGROUP` + per up to 10 jobs; 1 producer-side (`XADD`). +- Idle wait: the fetcher blocks in `XREADGROUP` for `WaitTimeout`. The default + is 10 s in `QueueOptions.Init` (`queue.go`), but `redisq.NewQueue` sets it to + 1 s first when it is zero (`redisq/queue.go`), so it is 1 s here. A worker + with an empty buffer waits on a 1 s timer (`waitMessage`, + `workerIdleTimeout`) and then loops. Redis wakes the fetcher as soon as an + `XADD` arrives, so blocking is a push wake for a single consumer. +- Scheduler loops: `NewQueue` starts three goroutines per queue, producers + included (`scheduler`: `delayed`, `pending`, `clean_zombie_consumers`). + Each pass takes a Redis lock with `redislock.Obtain` and releases it + (`withRedisLock`), runs one query, and sleeps `1000 + rand(500)` ms when it + found nothing (`schedulerBackoff`). They are idle work, not job work, but they + issue a few Redis commands per second per queue and the producer's one + queue runs them too (the harness calls the producer factory once per + iteration; the N producer goroutines share its one enqueue function), so each + iteration runs 3 loops for the producer plus 3 per consumer instance. `pending` + (`schedulePending`) re-queues entries unacked for `ReservationTimeout` + (5 min), so a run longer than 5 min with slow acks could redeliver; the + collector counts duplicates, and none were seen in `TestSubjects`. +- Stop: `Consumer.Stop` (`consumer.go`, `StopTimeout`) stops the fetchers first + and waits for them, which means waiting out the fetcher's current + `XREADGROUP` block (up to 1 s); idle workers return immediately on `stopCh`. + The adapter then calls `factory.Close`, which closes the queue + (`Queue.CloseTimeout` sets `_closed` and runs `XGROUP DELCONSUMER`), and + then closes the client. The scheduler goroutines are not waited on + (`CloseTimeout` never touches the queue's `WaitGroup`): they exit at their + next wake because `scheduler` checks `closed()` first, and any call they have + in flight when the client closes fails. So every stop costs up to about + 1 s, inside the timed region. `TestTaskqStopLeavesNothingWriting` checks + that nothing writes to Redis after stop returns (a mutant that skips the + close makes it fail: a scheduler recreates the stream group). +- Registry: `taskq.RegisterTask` is global and panics on a second register of + the same name (`task.go`, `RegisterTask`, which wraps `registry.go` + `TaskMap.Register`, the function that returns the error), so the adapter registers + the task `bench` once at package level and routes to the current handler + through an `atomic.Pointer`. All instances of one run share one handler, and + the harness stops a round before the next starts. The queue registry is per + factory (`internal/base/factory.go`, `Factory.Register`), so each instance + has its own factory. +- Pool size: `poolSize(workers)` on our go-redis v8 `Options.PoolSize` per + consumer instance, `poolSize(0)` per producer (v8's own default is + `10 * GOMAXPROCS` as well). +- Logging: taskq logs through `internal.Logger`, set with `taskq.SetLogger`, + and go-redis v8 through `redis.SetLogger`; the adapter sets both to no-ops + in `init`. + +### GocraftWork + +Library version `github.com/gocraft/work v0.5.1`, which imports redigo as +`github.com/gomodule/redigo/redis` (`worker_pool.go`, `enqueue.go`), so the +adapter uses redigo `v1.9.3` and no old `garyburd` import is involved. Paths are +inside the module (`go env GOMODCACHE`). The adapter builds one redigo pool per +consumer instance (one `WorkerPool`), and one per producer (one `Enqueuer`). +Namespace `bench`, job name `bench`, so the job list is `bench:jobs:bench`. + +- Enqueue: `Enqueuer.Enqueue` (`enqueue.go`) runs one `LPUSH bench:jobs:bench + `, then `addToKnownJobs`, which runs `SADD bench:known_jobs bench` + at least once per `Enqueuer` and again after 300 s. The check is not atomic + (read under `RLock`, then `SADD`, then write under `Lock`), so concurrent first + enqueues each issue their own `SADD`: 8 and 10 seen in two runs with 100 producers (`INFO + commandstats` after `BenchmarkEnqueue/100u-1Kt`, against 100,000 `LPUSH`). So + one round trip per job, not pipelined, plus a few extra at the start. The adapter + holds one `Enqueuer` per producer factory call; the N producer goroutines of + a run share it and its pool. +- Serialization: `Job.serialize` (`job.go`) is `json.Marshal` of a `Job` + (`name`, `id`, `t`, `args`). The adapter's JSON rides as the string argument + `p` inside `args`, so it is JSON-escaped inside the job JSON. The `id` is 12 + bytes from `crypto/rand` as hex (`identifier.go`, `makeIdentifier`), made on + every `Enqueue`. The consumer side runs `json.Unmarshal` into a `Job` + (`newJob`, `job.go`) and the adapter then unmarshals `p` a second time. +- Fetch: each worker is one goroutine running `worker.loop` (`worker.go`), + which calls `fetchJob` and `processJob` in turn, so `concurrency` workers mean + `concurrency` jobs in flight. `fetchJob` runs one Lua script through + `redis.Script.Do` (`redisLuaFetchJob`, `redis.go`), which sends `EVALSHA` and + falls back to `EVAL` once on `NOSCRIPT` (redigo `redis/script.go`, `Do`). For a + non-empty queue the script runs `GET max_concurrency`, `LLEN`, `GET paused`, + `GET lock`, `INCR lock`, `HINCRBY lock_info` and `RPOPLPUSH + bench:jobs:bench bench:jobs:bench::inprogress`: 1 round trip and 7 + commands inside the script. On an empty queue it stops after the first two + (`GET`, `LLEN`) and returns nil. The in-progress list is per `WorkerPool`. +- Priority sampling: `prioritySampler.sample` (`priority_sampler.go`) runs on + every fetch, but its loop only runs while more than one job type is + registered; we register one, so it does nothing. The default priority is 1 + (`applyDefaultsAndValidate`, `worker_pool.go`). +- Ack: after the handler returns, `removeJobFromInProgress` (`worker.go`) sends + `MULTI`, `LREM 1 `, `DECR lock` and `HINCRBY + lock_info -1` with `conn.Send`, then runs `EXEC` with `conn.Do`, + which flushes all five commands and reads all five replies (redigo + `redis/conn.go`, `DoWithTimeout`): 1 round trip. The handler returns nil, so `jobFate` is not + reached: no retry or dead-queue write. +- Per job, consumer side: 2 round trips (the fetch script, then the + `MULTI`/`EXEC` pipeline). Idle polls and the background loops below come on + top. `Job.Unique` is false, so `deleteUniqueJob` (an extra `DEL`) is skipped. +- Idle wait: polling only, no blocking pop and no push wake-up. + `sleepBackoffsInMilliseconds = {0, 10, 100, 1000, 5000}` (`worker.go`). + `loop` counts consecutive empty fetches; the first empty fetch sleeps 10 ms + (index 1; index 0 is never used after an empty fetch), the second 100 ms, the + third 1 s, and the fourth and every later one 5 s. A fetched job resets the + count and the timer to 0. The sleep is a timer in the same `select` as the + stop channel, so `Stop` does not wait out a sleep; it waits for a worker's + current job to finish. +- Background loops, per `WorkerPool` (`WorkerPool.Start`, `worker_pool.go`): + - observer, one per worker (`observer.loop`, `observer.go`): 1 s ticker, + writes `HMSET`+`EXPIRE` (or `DEL` when idle) only when something changed + since the last write, and writes immediately on its first observation. The + worker hands it a start and a done observation per job over a 1,024-slot + channel without touching Redis. So up to one 2-command pipeline per worker + per second. + - heartbeater (`heartbeater.go`, `beatPeriod`): 5 s, `SADD` + `HMSET` + pipelined, and once right at start; `SREM` + `DEL` on stop. + - retry and scheduled requeuers (`requeuer.loop`, `requeuer.go`): 1 s ticker + each, one Lua `ZRANGEBYSCORE` per tick on `bench:retry` and + `bench:scheduled`, which stay empty. + - dead pool reaper (`dead_pool_reaper.go`): first pass after `deadTime` + 10 s, then every `reapPeriod` 10 min plus up to 29 s of jitter. It treats a + pool as dead when its `heartbeat_at` is 10 s old or its heartbeat key is + gone (`findDeadPools`), and then requeues that pool's in-progress jobs + (`requeueInProgressJobs`). Every instance runs one. With the 5 s heartbeat a + live pool is not reaped unless its heartbeat is late by more than 5 s; if it + were, its in-flight jobs would be redelivered. Four probe runs of about 10 to 17 s + (W10C1 `Sleep1ms` on both workloads, W10C4 `Sleep1ms` and W1000C4 `Noop` on + `1u-100Kt`) saw no duplicates; that was not kept as a test. + - periodic enqueuer (`periodic_enqueuer.go`): `GET last_periodic_enqueue`, and a + `SET` if the key is absent or more than 2 s old (`shouldEnqueue` compares + against `int64(periodicEnqueuerSleep/time.Minute)`, which is 2 seconds), at + start and then every 2 min plus up to 29 s of jitter. We register no + periodic jobs. + - `Start` also runs `SET max_concurrency 0` for the job synchronously and + launches `SADD bench:known_jobs bench` in a goroutine it never waits for + (`writeConcurrencyControlsToRedis`, `writeKnownJobsToRedis`). + So each instance runs 2 goroutines per worker (loop and observer) plus 5 + background goroutines. +- Stop: `WorkerPool.Stop` (`worker_pool.go`) sends a stop message to every + worker (which also drains and stops its observer), then to the heartbeater, + both requeuers, the reaper and the periodic enqueuer, and waits for each + reply, so all of them have returned when it returns. The only goroutine it + does not wait for is the known-jobs `SADD` above, which normally finishes + right after `Start`. The adapter then closes the pool. + `TestGocraftStopLeavesNothingRunning` checks that no goroutine inside + `gocraft/work` remains after stop, that nothing writes after `FLUSHDB` (waits + 6 s, longer than the 5 s heartbeat), and that stdout stays empty (a mutant that + skips `wp.Stop()` fails it). +- Pool size: `poolSize(workers)` for `MaxActive` and `MaxIdle` per consumer + instance, `poolSize(0)` per producer. `Wait: true` is our choice, not a + default: without it `Pool.Get` returns `ErrPoolExhausted` at `MaxActive` + (redigo `redis/pool.go`), which gocraft/work would log instead of waiting. +- Logging: `logError` (`log.go`) is `fmt.Printf` to **stdout**, not the std + `log` package, and has no hook, so `log.SetOutput` does not silence it. It is + only called when a Redis call or a job fails (fetch, ack, heartbeat, requeue + and observer errors, handler panics), so a healthy run prints nothing; the + stop test above pins that for a short run. A line there would break the + `vizb` parse of `redis.txt` and is a run failure to investigate. + +### Work table + +| Subject | Ack on hot path | Wake mechanism | Idle wait | Round trips per job | Serialization | Pool size | Forced settings | +|---------|-----------------|----------------|-----------|---------------------|---------------|-----------|-----------------| +| VarMQ (persistent) | one pop script per up to k jobs (`listAckPop`, `redisq/queue.go`: `HMGET` guard, `LRANGE`+`LTRIM`, `HSET`, `ZADD` deadline, `ZADD` heartbeat, `LLEN`; `LPOP` variant at k = 1), then one `HDEL`+`ZREM` pipeline per job (`Queue.Acknowledge`): 2 round trips per job at k = 1, falling toward 1 as k grows; k = 64 is the upper bound, not the expected value | in-process: `Add` pokes the ready hint and signals the event loop (`persistentQueue.Add`, `varmq/persistent.go`); no polling on the hot path | 1 `LLEN` per second while the hint is dry (`resync`, `varmq/source.go`), so a second process's adds would be seen up to 1 s late; the subject runs 1 instance | consumer side 1 ack pipeline per job plus 1 pop script per k jobs, k = the free slots at each wake, at most min(workers, 64), sized by `popLen`; the first pass asks for the full credit and pops what is queued, later passes ask for what finished since (not measured); producer side 1 (`RPUSH`); not per job: 1 sweep script per second per queue object | `varmq.Job` JSON (`{id, status, data}`) wrapping the payload | `poolSize(workers)` via `pool_size` in the URL; acks use go-redis's pipeline pool, up to 10 at a time, the rest spill to the main pool | `concurrency = workers` (`varmq.NewWorker(fn, workers)`, `redis/varmq.go`), queue key `bench`, `WithAutoRun(false)` on the Enqueue-only producer; defaults kept: visibility timeout 5 min, heartbeat timeout 30 s, dedup window 5 min | +| Asynq | `EVALSHA` Lua scripts: dequeue (`RPOPLPUSH` pending to active, `HSET`/`HDEL`, `ZADD` lease, `HGET`), then done (`LREM`, `ZREM`, `DEL`, `INCR`/`GET`/`INCR`), 2 round trips | polling: no blocking pop, no push wake | `time.Sleep(TaskCheckInterval/2 + rand.N(TaskCheckInterval))` on an empty queue, `TaskCheckInterval` default 1 s, so 0.5 to 1.5 s; idle `Shutdown` waits out the current sleep | 2 consumer-side, 1 producer-side (plus 1 `SADD` per client) | protobuf `TaskMessage` wrapping the JSON payload, in a task hash | `poolSize(workers)` via `RedisClientOpt.PoolSize` | queue `bench`; defaults kept: retry 25, timeout 30 min, lease 30 s, no retention | +| VarMQDistributed | same pop script and ack pipeline as VarMQ, with the consumer id so a short pop on an empty queue joins `bench:idle` in the same script | push to one consumer per item: the enqueue script `SPOP`s `bench:idle` and `PUBLISH`es `enqueued` on `bench:wake:` (`listPushWake`, `redisq/distributed.go`); a 1 s `nudge` script per consumer re-delivers `enqueued` while items wait; sweep and `Close` wake for what they requeue | no polling on the hot path; the 1 s `nudge` script per consumer is a safety net for lost wakes; sweep script every 1 s per queue object; go-redis pub/sub `PING` every 3 s idle (`pubsub.go`, `initHealthCheck`) | consumer side 1 ack pipeline per job plus 1 pop script per k jobs, as VarMQ; producer side 1 script per job (`RPUSH` plus the wakes) | `varmq.Job` JSON wrapping the payload | `poolSize(workers)` via `pool_size` in the URL, `poolSize(0)` for the producer; pub/sub uses go-redis's own pub/sub pool; acks use its pipeline pool, up to 10 at a time, the rest spill to the main pool | `concurrency = workers` (`varmq.NewWorker(fn, workers)`, `redis/varmq_distributed.go`), queue key `bench`; defaults kept: visibility timeout 5 min, heartbeat timeout 30 s, dedup window 5 min | +| Rmq | `LREM unacked 1 ` per job (`redisDelivery.Ack`, `delivery.go`), 1 round trip; fetch is one `RPOPLPUSH` ready to unacked per job (`consumeBatch`, `queue.go`) | polling only: no blocking pop, no push | `time.Sleep(jitteredDuration(pollDuration))` after every fetch pass, +/-10% (90 to 110 ms at our setting), not only when empty; no back-off found in `consume` | 2 consumer-side (`RPOPLPUSH`, `LREM`) plus 1 `LLEN` per pass, 1 producer-side (`LPUSH`) | plain string payload (the JSON) | `poolSize(workers)` on our go-redis client (rmq does not create it) | poll duration 100 ms and prefetch limit `max(1000, 2*workers)`: rmq has no default for either; both follow `example/consumer/main.go` in rmq v5.2.0 (`prefetchLimit = 1000`, `pollDuration = 100 * time.Millisecond`), with the prefetch raised to 2 x workers because rmq's `README.md` says the prefetch limit should always be greater than the number of consumers; `consume` sleeps after every batch, so a connection is capped near prefetch / poll (about 10,000 jobs/s at 1000 / 100 ms; derived from `consume`, not measured); queue `bench`, tag `bench`; no cleaner | +| Taskq | `XACK`, then `XDEL`, run separately by the worker after the handler (`Queue.Delete`, `redisq/queue.go`), 2 round trips | blocking: `XREADGROUP ... BLOCK` by one fetcher per instance, woken by `XADD` | `WaitTimeout` 1 s: `redisq.NewQueue` sets it before the 10 s default in `QueueOptions.Init`; workers re-check an empty buffer every 1 s; 3 scheduler loops per queue sleep 1 to 1.5 s between passes; `Stop` waits out the fetcher's current block (up to 1 s) | 2 consumer-side (`XACK`, `XDEL`) plus 1 `XREADGROUP` per up to 10 jobs, 1 producer-side (`XADD`) | msgpack `Message` holding msgpack args holding the JSON payload as bytes, in the stream field `body` | `poolSize(workers)` on our go-redis v8 client (`Options.PoolSize`) | `MinNumWorker = MaxNumWorker = workers` (disables autotune, so one fetcher); defaults kept (all in `QueueOptions.Init`, `queue.go`, except as noted): `ReservationSize` 10, `BufferSize` = `ReservationSize`, `ReservationTimeout` 5 min, `WaitTimeout` 1 s (`redisq.NewQueue`, `redisq/queue.go`), retry limit 64 (`TaskOptions.init`, `task.go`); queue `bench`, task `bench`; handler always returns nil | +| GocraftWork | `LREM 1 ` in a `MULTI`/`EXEC` with `DECR lock` and `HINCRBY lock_info` (`removeJobFromInProgress`, `worker.go`), after the handler, 1 round trip; fetch is one Lua script (`redisLuaFetchJob`, `redis.go`) doing `RPOPLPUSH` to a per-pool in-progress list, 1 round trip | polling only: no blocking pop, no push | per-worker backoff `{0, 10, 100, 1000, 5000}` ms after consecutive empty fetches, reset to 0 by a job (`sleepBackoffsInMilliseconds`, `worker.loop`, `worker.go`); `Stop` does not wait out a sleep; other loops: observer 1 s per worker, heartbeat 5 s, requeuers 1 s, reaper first at 10 s then every 10 min, periodic enqueuer 2 min | 2 consumer-side (fetch script, `MULTI`/`EXEC`) plus 1 script per idle poll, 1 producer-side (`LPUSH`; plus at least 1 `SADD` per `Enqueuer`, one per concurrent first enqueue (8 and 10 seen in two runs with 100 producers), and again every 300 s) | JSON `Job` whose `args.p` holds the JSON payload as a string | `poolSize(workers)` for redigo `MaxActive` and `MaxIdle`, `Wait: true` (our choice) | none beyond pool size; `MaxFails` 4 and priority 1 stay at their defaults (`applyDefaultsAndValidate`, `worker_pool.go`) and are not reached because the handler returns nil; namespace `bench`, job `bench`; `logError` prints to stdout (`log.go`) and cannot be redirected | diff --git a/redis/Taskfile.yml b/redis/Taskfile.yml new file mode 100644 index 0000000..e24e981 --- /dev/null +++ b/redis/Taskfile.yml @@ -0,0 +1,25 @@ +version: "3" +tasks: + up: + desc: Redis 7.2 on localhost:6390 + cmds: + - docker compose up -d --wait + down: + desc: Stop Redis + cmds: + - docker compose down + test: + desc: Module tests (needs up) + cmds: + - go vet ./... + - go test ./... + bench: + desc: Every benchmark once (needs up) + cmds: + - go test -run xxx -bench . -benchtime=1x -benchmem -timeout 0 + txt: + desc: Durable + Enqueue + Latency into bench/redis.txt, client pinned off the Redis core (needs up, hours) + cmds: + - mkdir -p bench + # client on every core except 14 (Redis) and its sibling 15, like the compose cpuset + - set -o pipefail; taskset -c 0-13,16-23 go test -run xxx -bench . -benchtime=2x -benchmem -timeout 0 | tee bench/redis.txt diff --git a/redis/asynq.go b/redis/asynq.go new file mode 100644 index 0000000..bd3f65a --- /dev/null +++ b/redis/asynq.go @@ -0,0 +1,79 @@ +package durable + +import ( + "context" + + "github.com/hibiken/asynq" + "github.com/redis/go-redis/v9" +) + +const ( + asynqQueue = "bench" + asynqTaskType = "bench" +) + +// asynqSilent drops every asynq log line. The server also gets LogLevel +// FatalLevel, so most calls never reach it. +type asynqSilent struct{} + +func (asynqSilent) Debug(...any) {} +func (asynqSilent) Info(...any) {} +func (asynqSilent) Warn(...any) {} +func (asynqSilent) Error(...any) {} +func (asynqSilent) Fatal(...any) {} // must not exit the process + +func asynqOpt(url string, workers int) asynq.RedisClientOpt { + o, err := redis.ParseURL(url) + if err != nil { + panic(err) // the URL was already used by redisOrSkip + } + + return asynq.RedisClientOpt{ + Addr: o.Addr, + DB: o.DB, + Username: o.Username, + Password: o.Password, + TLSConfig: o.TLSConfig, + PoolSize: poolSize(workers), + } +} + +// asynqProducer enqueues one task per payload on the "bench" queue. +func asynqProducer(url string) (enqueueFunc, func()) { + c := asynq.NewClient(asynqOpt(url, 0)) + + return func(p payload) error { + _, err := c.Enqueue(asynq.NewTask(asynqTaskType, p.marshal()), asynq.Queue(asynqQueue)) + + return err + }, func() { _ = c.Close() } +} + +// asynqConsumer runs an asynq server with workers as its concurrency. Shutdown +// waits for in-flight handlers and closes the server's Redis client. +func asynqConsumer(url string, workers int, h handler) (enqueueFunc, func()) { + srv := asynq.NewServer(asynqOpt(url, workers), asynq.Config{ + Concurrency: workers, + Queues: map[string]int{asynqQueue: 1}, + Logger: asynqSilent{}, + LogLevel: asynq.FatalLevel, + }) + + mux := asynq.NewServeMux() + mux.HandleFunc(asynqTaskType, func(_ context.Context, t *asynq.Task) error { + p, err := unmarshalPayload(t.Payload()) + if err != nil { + return err + } + + h(p) + + return nil + }) + + if err := srv.Start(mux); err != nil { + panic(err) // only fails on a nil handler or a reused server + } + + return nil, srv.Shutdown +} diff --git a/redis/bench/redis.txt b/redis/bench/redis.txt new file mode 100644 index 0000000..0de8b63 --- /dev/null +++ b/redis/bench/redis.txt @@ -0,0 +1,156 @@ +goos: linux +goarch: amd64 +pkg: github.com/goptics/benchmarks/redis +cpu: 13th Gen Intel(R) Core(TM) i7-13700 +BenchmarkDurable/NoopW10C1/1u-100Kt/VarMQ-22 2 4660138216 ns/op 21459 jobs/s 341970780 B/op 8050450 allocs/op +BenchmarkDurable/NoopW10C1/1u-100Kt/Asynq-22 2 6254632532 ns/op 15988 jobs/s 619451756 B/op 10710585 allocs/op +BenchmarkDurable/NoopW10C1/1u-100Kt/VarMQDistributed-22 2 4760586681 ns/op 21006 jobs/s 372611672 B/op 8855654 allocs/op +BenchmarkDurable/NoopW10C1/1u-100Kt/Rmq-22 2 16140937250 ns/op 6195 jobs/s 186486828 B/op 3606014 allocs/op +BenchmarkDurable/NoopW10C1/1u-100Kt/Taskq-22 2 5273383156 ns/op 18963 jobs/s 563257368 B/op 9554556 allocs/op +BenchmarkDurable/NoopW10C1/1u-100Kt/GocraftWork-22 2 3990879753 ns/op 25057 jobs/s 465620900 B/op 8559079 allocs/op +BenchmarkDurable/NoopW10C1/100u-1Kt/VarMQ-22 2 2382556832 ns/op 41972 jobs/s 272205268 B/op 5808170 allocs/op +BenchmarkDurable/NoopW10C1/100u-1Kt/Asynq-22 2 5546432302 ns/op 18030 jobs/s 624823420 B/op 10718085 allocs/op +BenchmarkDurable/NoopW10C1/100u-1Kt/VarMQDistributed-22 2 2530875355 ns/op 39512 jobs/s 301576840 B/op 6527396 allocs/op +BenchmarkDurable/NoopW10C1/100u-1Kt/Rmq-22 2 16855669360 ns/op 5933 jobs/s 193368184 B/op 3618965 allocs/op +BenchmarkDurable/NoopW10C1/100u-1Kt/Taskq-22 2 2805170852 ns/op 35648 jobs/s 493553924 B/op 7909298 allocs/op +BenchmarkDurable/NoopW10C1/100u-1Kt/GocraftWork-22 2 2020064260 ns/op 49503 jobs/s 464611588 B/op 8612467 allocs/op +BenchmarkDurable/NoopW10C4/1u-100Kt/Asynq-22 2 7659010916 ns/op 13057 jobs/s 620344536 B/op 10713142 allocs/op +BenchmarkDurable/NoopW10C4/1u-100Kt/VarMQDistributed-22 2 4556737486 ns/op 21946 jobs/s 466225080 B/op 11613077 allocs/op +BenchmarkDurable/NoopW10C4/1u-100Kt/Rmq-22 2 4583724296 ns/op 21816 jobs/s 188107792 B/op 3609605 allocs/op +BenchmarkDurable/NoopW10C4/1u-100Kt/Taskq-22 2 9117086182 ns/op 10968 jobs/s 560283404 B/op 9624622 allocs/op +BenchmarkDurable/NoopW10C4/1u-100Kt/GocraftWork-22 2 3898627187 ns/op 25650 jobs/s 466574524 B/op 8593932 allocs/op +BenchmarkDurable/NoopW10C4/100u-1Kt/Asynq-22 2 5160755838 ns/op 19377 jobs/s 626413060 B/op 10721929 allocs/op +BenchmarkDurable/NoopW10C4/100u-1Kt/VarMQDistributed-22 2 1808504742 ns/op 55294 jobs/s 309991992 B/op 6504471 allocs/op +BenchmarkDurable/NoopW10C4/100u-1Kt/Rmq-22 2 6075652520 ns/op 16459 jobs/s 194704272 B/op 3621811 allocs/op +BenchmarkDurable/NoopW10C4/100u-1Kt/Taskq-22 2 5817066848 ns/op 17191 jobs/s 492643232 B/op 7911916 allocs/op +BenchmarkDurable/NoopW10C4/100u-1Kt/GocraftWork-22 2 2047538030 ns/op 48839 jobs/s 465169076 B/op 8617294 allocs/op +BenchmarkDurable/NoopW100C1/1u-100Kt/VarMQ-22 2 4794078386 ns/op 20859 jobs/s 342034268 B/op 8073940 allocs/op +BenchmarkDurable/NoopW100C1/1u-100Kt/Asynq-22 2 5889967712 ns/op 16978 jobs/s 618914556 B/op 10708204 allocs/op +BenchmarkDurable/NoopW100C1/1u-100Kt/VarMQDistributed-22 2 4681586288 ns/op 21360 jobs/s 373718500 B/op 8873048 allocs/op +BenchmarkDurable/NoopW100C1/1u-100Kt/Rmq-22 2 16316678295 ns/op 6129 jobs/s 186544472 B/op 3607186 allocs/op +BenchmarkDurable/NoopW100C1/1u-100Kt/Taskq-22 2 5423331751 ns/op 18439 jobs/s 563100892 B/op 9554740 allocs/op +BenchmarkDurable/NoopW100C1/1u-100Kt/GocraftWork-22 2 3950294246 ns/op 25315 jobs/s 469507828 B/op 8628049 allocs/op +BenchmarkDurable/NoopW100C1/100u-1Kt/VarMQ-22 2 1651498950 ns/op 60551 jobs/s 252967448 B/op 5091237 allocs/op +BenchmarkDurable/NoopW100C1/100u-1Kt/Asynq-22 2 5043473432 ns/op 19828 jobs/s 624761552 B/op 10717897 allocs/op +BenchmarkDurable/NoopW100C1/100u-1Kt/VarMQDistributed-22 2 1821080060 ns/op 54912 jobs/s 283038844 B/op 5795919 allocs/op +BenchmarkDurable/NoopW100C1/100u-1Kt/Rmq-22 2 17068249388 ns/op 5859 jobs/s 193402076 B/op 3620288 allocs/op +BenchmarkDurable/NoopW100C1/100u-1Kt/Taskq-22 2 2812115118 ns/op 35560 jobs/s 495896112 B/op 7912688 allocs/op +BenchmarkDurable/NoopW100C1/100u-1Kt/GocraftWork-22 2 2216823090 ns/op 45110 jobs/s 468298980 B/op 8628288 allocs/op +BenchmarkDurable/NoopW100C4/1u-100Kt/Asynq-22 2 7613365668 ns/op 13135 jobs/s 620267520 B/op 10712920 allocs/op +BenchmarkDurable/NoopW100C4/1u-100Kt/VarMQDistributed-22 2 4447665626 ns/op 22484 jobs/s 466069140 B/op 11611854 allocs/op +BenchmarkDurable/NoopW100C4/1u-100Kt/Rmq-22 2 4464379980 ns/op 22400 jobs/s 188468272 B/op 3615649 allocs/op +BenchmarkDurable/NoopW100C4/1u-100Kt/Taskq-22 2 9408326273 ns/op 10629 jobs/s 561641016 B/op 9629614 allocs/op +BenchmarkDurable/NoopW100C4/1u-100Kt/GocraftWork-22 2 3919793386 ns/op 25512 jobs/s 477637056 B/op 8680958 allocs/op +BenchmarkDurable/NoopW100C4/100u-1Kt/Asynq-22 2 4717378588 ns/op 21198 jobs/s 626365468 B/op 10721667 allocs/op +BenchmarkDurable/NoopW100C4/100u-1Kt/VarMQDistributed-22 2 1524251192 ns/op 65606 jobs/s 313615728 B/op 5977815 allocs/op +BenchmarkDurable/NoopW100C4/100u-1Kt/Rmq-22 2 5921019568 ns/op 16889 jobs/s 195142320 B/op 3627461 allocs/op +BenchmarkDurable/NoopW100C4/100u-1Kt/Taskq-22 2 6242838893 ns/op 16018 jobs/s 492062196 B/op 7916362 allocs/op +BenchmarkDurable/NoopW100C4/100u-1Kt/GocraftWork-22 2 2311448048 ns/op 43263 jobs/s 478617656 B/op 8620196 allocs/op +BenchmarkDurable/NoopW1000C1/1u-100Kt/VarMQ-22 2 4755794292 ns/op 21027 jobs/s 341894300 B/op 8064427 allocs/op +BenchmarkDurable/NoopW1000C1/1u-100Kt/Asynq-22 2 6458217219 ns/op 15484 jobs/s 619055228 B/op 10706891 allocs/op +BenchmarkDurable/NoopW1000C1/1u-100Kt/VarMQDistributed-22 2 4690984052 ns/op 21317 jobs/s 374191276 B/op 8881169 allocs/op +BenchmarkDurable/NoopW1000C1/1u-100Kt/Rmq-22 2 9736617143 ns/op 10271 jobs/s 188602416 B/op 3623251 allocs/op +BenchmarkDurable/NoopW1000C1/1u-100Kt/Taskq-22 2 5903633940 ns/op 16939 jobs/s 558403808 B/op 9550894 allocs/op +BenchmarkDurable/NoopW1000C1/1u-100Kt/GocraftWork-22 2 4014070310 ns/op 24912 jobs/s 493408596 B/op 8762806 allocs/op +BenchmarkDurable/NoopW1000C1/100u-1Kt/VarMQ-22 2 1689692550 ns/op 59182 jobs/s 254575644 B/op 5086733 allocs/op +BenchmarkDurable/NoopW1000C1/100u-1Kt/Asynq-22 2 5349566296 ns/op 18693 jobs/s 625184892 B/op 10717725 allocs/op +BenchmarkDurable/NoopW1000C1/100u-1Kt/VarMQDistributed-22 2 1799143516 ns/op 55582 jobs/s 284194840 B/op 5790297 allocs/op +BenchmarkDurable/NoopW1000C1/100u-1Kt/Rmq-22 2 10732525464 ns/op 9317 jobs/s 194564512 B/op 3633891 allocs/op +BenchmarkDurable/NoopW1000C1/100u-1Kt/Taskq-22 2 3505002214 ns/op 28531 jobs/s 491325160 B/op 7910658 allocs/op +BenchmarkDurable/NoopW1000C1/100u-1Kt/GocraftWork-22 2 2456385560 ns/op 40710 jobs/s 492562652 B/op 8701017 allocs/op +BenchmarkDurable/NoopW1000C4/1u-100Kt/Asynq-22 2 6887565968 ns/op 14519 jobs/s 621648720 B/op 10710477 allocs/op +BenchmarkDurable/NoopW1000C4/1u-100Kt/VarMQDistributed-22 2 4474889088 ns/op 22347 jobs/s 467041912 B/op 11605436 allocs/op +BenchmarkDurable/NoopW1000C4/1u-100Kt/Rmq-22 2 4340041156 ns/op 23041 jobs/s 193136380 B/op 3675198 allocs/op +BenchmarkDurable/NoopW1000C4/1u-100Kt/Taskq-22 2 13050093492 ns/op 7663 jobs/s 557707020 B/op 9638354 allocs/op +BenchmarkDurable/NoopW1000C4/1u-100Kt/GocraftWork-22 2 5117109332 ns/op 19542 jobs/s 582255088 B/op 9256869 allocs/op +BenchmarkDurable/NoopW1000C4/100u-1Kt/Asynq-22 2 6065173054 ns/op 16488 jobs/s 628754844 B/op 10722390 allocs/op +BenchmarkDurable/NoopW1000C4/100u-1Kt/VarMQDistributed-22 2 1538623278 ns/op 64993 jobs/s 317572140 B/op 5987060 allocs/op +BenchmarkDurable/NoopW1000C4/100u-1Kt/Rmq-22 2 3978273324 ns/op 25137 jobs/s 199570512 B/op 3682592 allocs/op +BenchmarkDurable/NoopW1000C4/100u-1Kt/Taskq-22 2 8789774646 ns/op 11377 jobs/s 490088456 B/op 7934199 allocs/op +BenchmarkDurable/NoopW1000C4/100u-1Kt/GocraftWork-22 2 3060691912 ns/op 32672 jobs/s 579524248 B/op 9170004 allocs/op +BenchmarkDurable/Sleep1msW10C1/1u-100Kt/VarMQ-22 2 16643942770 ns/op 6008 jobs/s 295160040 B/op 6718560 allocs/op +BenchmarkDurable/Sleep1msW10C1/1u-100Kt/Asynq-22 2 18417404712 ns/op 5430 jobs/s 628565024 B/op 10809109 allocs/op +BenchmarkDurable/Sleep1msW10C1/1u-100Kt/VarMQDistributed-22 2 16874262141 ns/op 5926 jobs/s 322420828 B/op 7383057 allocs/op +BenchmarkDurable/Sleep1msW10C1/1u-100Kt/Rmq-22 2 17209670053 ns/op 5811 jobs/s 186697376 B/op 3605568 allocs/op +BenchmarkDurable/Sleep1msW10C1/1u-100Kt/Taskq-22 2 16610113127 ns/op 6020 jobs/s 488904832 B/op 7905780 allocs/op +BenchmarkDurable/Sleep1msW10C1/1u-100Kt/GocraftWork-22 2 16717330972 ns/op 5982 jobs/s 462102976 B/op 8607628 allocs/op +BenchmarkDurable/Sleep1msW10C1/100u-1Kt/VarMQ-22 2 20223700824 ns/op 4945 jobs/s 274352292 B/op 5887699 allocs/op +BenchmarkDurable/Sleep1msW10C1/100u-1Kt/Asynq-22 2 20003021726 ns/op 4999 jobs/s 635266188 B/op 10821824 allocs/op +BenchmarkDurable/Sleep1msW10C1/100u-1Kt/VarMQDistributed-22 2 20758417156 ns/op 4817 jobs/s 303251040 B/op 6591055 allocs/op +BenchmarkDurable/Sleep1msW10C1/100u-1Kt/Rmq-22 2 21803618795 ns/op 4586 jobs/s 193706736 B/op 3619736 allocs/op +BenchmarkDurable/Sleep1msW10C1/100u-1Kt/Taskq-22 2 19506354846 ns/op 5127 jobs/s 489174716 B/op 7907319 allocs/op +BenchmarkDurable/Sleep1msW10C1/100u-1Kt/GocraftWork-22 2 18989631297 ns/op 5266 jobs/s 463470924 B/op 8611652 allocs/op +BenchmarkDurable/Sleep1msW10C4/1u-100Kt/Asynq-22 2 7012835107 ns/op 14260 jobs/s 631919704 B/op 10818480 allocs/op +BenchmarkDurable/Sleep1msW10C4/1u-100Kt/VarMQDistributed-22 2 4563259863 ns/op 21914 jobs/s 480222500 B/op 11851642 allocs/op +BenchmarkDurable/Sleep1msW10C4/1u-100Kt/Rmq-22 2 3688909585 ns/op 27108 jobs/s 189686824 B/op 3611543 allocs/op +BenchmarkDurable/Sleep1msW10C4/1u-100Kt/Taskq-22 2 9083554352 ns/op 11009 jobs/s 558646056 B/op 9622804 allocs/op +BenchmarkDurable/Sleep1msW10C4/1u-100Kt/GocraftWork-22 2 3666089961 ns/op 27277 jobs/s 463776852 B/op 8557982 allocs/op +BenchmarkDurable/Sleep1msW10C4/100u-1Kt/Asynq-22 2 8528030540 ns/op 11726 jobs/s 638238008 B/op 10828737 allocs/op +BenchmarkDurable/Sleep1msW10C4/100u-1Kt/VarMQDistributed-22 2 5045046645 ns/op 19821 jobs/s 332798904 B/op 7215201 allocs/op +BenchmarkDurable/Sleep1msW10C4/100u-1Kt/Rmq-22 2 5382100096 ns/op 18580 jobs/s 196635944 B/op 3625114 allocs/op +BenchmarkDurable/Sleep1msW10C4/100u-1Kt/Taskq-22 2 9077449858 ns/op 11016 jobs/s 489692632 B/op 7911058 allocs/op +BenchmarkDurable/Sleep1msW10C4/100u-1Kt/GocraftWork-22 2 5506263562 ns/op 18161 jobs/s 464862984 B/op 8619113 allocs/op +BenchmarkDurable/Sleep1msW100C1/1u-100Kt/VarMQ-22 2 4557653314 ns/op 21941 jobs/s 340412832 B/op 7924454 allocs/op +BenchmarkDurable/Sleep1msW100C1/1u-100Kt/Asynq-22 2 5977082705 ns/op 16731 jobs/s 630095824 B/op 10813508 allocs/op +BenchmarkDurable/Sleep1msW100C1/1u-100Kt/VarMQDistributed-22 2 4684417872 ns/op 21347 jobs/s 372092712 B/op 8740852 allocs/op +BenchmarkDurable/Sleep1msW100C1/1u-100Kt/Rmq-22 2 18963055915 ns/op 5273 jobs/s 188997796 B/op 3611962 allocs/op +BenchmarkDurable/Sleep1msW100C1/1u-100Kt/Taskq-22 2 5192678320 ns/op 19258 jobs/s 554622740 B/op 9498814 allocs/op +BenchmarkDurable/Sleep1msW100C1/1u-100Kt/GocraftWork-22 2 3887319798 ns/op 25725 jobs/s 473665032 B/op 8763470 allocs/op +BenchmarkDurable/Sleep1msW100C1/100u-1Kt/VarMQ-22 2 2139577707 ns/op 46738 jobs/s 256403348 B/op 5197319 allocs/op +BenchmarkDurable/Sleep1msW100C1/100u-1Kt/Asynq-22 2 5396639856 ns/op 18530 jobs/s 636382528 B/op 10823905 allocs/op +BenchmarkDurable/Sleep1msW100C1/100u-1Kt/VarMQDistributed-22 2 2304332544 ns/op 43397 jobs/s 286540704 B/op 5901736 allocs/op +BenchmarkDurable/Sleep1msW100C1/100u-1Kt/Rmq-22 2 20059464481 ns/op 4985 jobs/s 196514200 B/op 3626616 allocs/op +BenchmarkDurable/Sleep1msW100C1/100u-1Kt/Taskq-22 2 3557707562 ns/op 28108 jobs/s 490732132 B/op 7909131 allocs/op +BenchmarkDurable/Sleep1msW100C1/100u-1Kt/GocraftWork-22 2 2227034738 ns/op 44903 jobs/s 467811520 B/op 8627337 allocs/op +BenchmarkDurable/Sleep1msW100C4/1u-100Kt/Asynq-22 2 7240356190 ns/op 13811 jobs/s 634489344 B/op 10822917 allocs/op +BenchmarkDurable/Sleep1msW100C4/1u-100Kt/VarMQDistributed-22 2 4556859994 ns/op 21945 jobs/s 475020660 B/op 11728013 allocs/op +BenchmarkDurable/Sleep1msW100C4/1u-100Kt/Rmq-22 2 4300819781 ns/op 23251 jobs/s 194323220 B/op 3626478 allocs/op +BenchmarkDurable/Sleep1msW100C4/1u-100Kt/Taskq-22 2 9429194839 ns/op 10605 jobs/s 558514160 B/op 9624120 allocs/op +BenchmarkDurable/Sleep1msW100C4/1u-100Kt/GocraftWork-22 2 4063563170 ns/op 24609 jobs/s 488757272 B/op 8985640 allocs/op +BenchmarkDurable/Sleep1msW100C4/100u-1Kt/Asynq-22 2 5239620461 ns/op 19085 jobs/s 639633996 B/op 10830687 allocs/op +BenchmarkDurable/Sleep1msW100C4/100u-1Kt/VarMQDistributed-22 2 1524584969 ns/op 65592 jobs/s 319547608 B/op 6015097 allocs/op +BenchmarkDurable/Sleep1msW100C4/100u-1Kt/Rmq-22 2 5898368070 ns/op 16954 jobs/s 202651212 B/op 3642513 allocs/op +BenchmarkDurable/Sleep1msW100C4/100u-1Kt/Taskq-22 2 6171626708 ns/op 16203 jobs/s 491739076 B/op 7926330 allocs/op +BenchmarkDurable/Sleep1msW100C4/100u-1Kt/GocraftWork-22 2 2386187782 ns/op 41908 jobs/s 481367020 B/op 8678739 allocs/op +BenchmarkDurable/Sleep1msW1000C1/1u-100Kt/VarMQ-22 2 4555447100 ns/op 21952 jobs/s 340801044 B/op 7926812 allocs/op +BenchmarkDurable/Sleep1msW1000C1/1u-100Kt/Asynq-22 2 5947630838 ns/op 16813 jobs/s 630423816 B/op 10812722 allocs/op +BenchmarkDurable/Sleep1msW1000C1/1u-100Kt/VarMQDistributed-22 2 4591782780 ns/op 21778 jobs/s 373138592 B/op 8753765 allocs/op +BenchmarkDurable/Sleep1msW1000C1/1u-100Kt/Rmq-22 2 11494451908 ns/op 8700 jobs/s 190112508 B/op 3625866 allocs/op +BenchmarkDurable/Sleep1msW1000C1/1u-100Kt/Taskq-22 2 6155874342 ns/op 16245 jobs/s 553025016 B/op 9496302 allocs/op +BenchmarkDurable/Sleep1msW1000C1/1u-100Kt/GocraftWork-22 2 4037605520 ns/op 24767 jobs/s 503046624 B/op 8998504 allocs/op +BenchmarkDurable/Sleep1msW1000C1/100u-1Kt/VarMQ-22 2 1309555424 ns/op 76362 jobs/s 257743648 B/op 5093603 allocs/op +BenchmarkDurable/Sleep1msW1000C1/100u-1Kt/Asynq-22 2 5716113041 ns/op 17494 jobs/s 637217912 B/op 10825879 allocs/op +BenchmarkDurable/Sleep1msW1000C1/100u-1Kt/VarMQDistributed-22 2 1508183506 ns/op 66305 jobs/s 289225692 B/op 5800515 allocs/op +BenchmarkDurable/Sleep1msW1000C1/100u-1Kt/Rmq-22 2 13060444879 ns/op 7657 jobs/s 197131604 B/op 3639473 allocs/op +BenchmarkDurable/Sleep1msW1000C1/100u-1Kt/Taskq-22 2 3618938928 ns/op 27632 jobs/s 490821488 B/op 7918685 allocs/op +BenchmarkDurable/Sleep1msW1000C1/100u-1Kt/GocraftWork-22 2 2673733311 ns/op 37401 jobs/s 496178008 B/op 8817710 allocs/op +BenchmarkDurable/Sleep1msW1000C4/1u-100Kt/Asynq-22 2 6862344362 ns/op 14572 jobs/s 634505480 B/op 10818596 allocs/op +BenchmarkDurable/Sleep1msW1000C4/1u-100Kt/VarMQDistributed-22 2 4548695022 ns/op 21984 jobs/s 477146296 B/op 11727409 allocs/op +BenchmarkDurable/Sleep1msW1000C4/1u-100Kt/Rmq-22 2 3617738874 ns/op 27642 jobs/s 196878632 B/op 3684994 allocs/op +BenchmarkDurable/Sleep1msW1000C4/1u-100Kt/Taskq-22 2 12424276828 ns/op 8049 jobs/s 557853024 B/op 9642113 allocs/op +BenchmarkDurable/Sleep1msW1000C4/1u-100Kt/GocraftWork-22 2 5298705130 ns/op 18873 jobs/s 594248236 B/op 9599640 allocs/op +BenchmarkDurable/Sleep1msW1000C4/100u-1Kt/Asynq-22 2 5461390939 ns/op 18310 jobs/s 641290840 B/op 10829984 allocs/op +BenchmarkDurable/Sleep1msW1000C4/100u-1Kt/VarMQDistributed-22 2 1541417678 ns/op 64875 jobs/s 337269972 B/op 6080406 allocs/op +BenchmarkDurable/Sleep1msW1000C4/100u-1Kt/Rmq-22 2 3839008409 ns/op 26048 jobs/s 207091216 B/op 3701341 allocs/op +BenchmarkDurable/Sleep1msW1000C4/100u-1Kt/Taskq-22 2 8476866406 ns/op 11797 jobs/s 494305536 B/op 7954337 allocs/op +BenchmarkDurable/Sleep1msW1000C4/100u-1Kt/GocraftWork-22 2 3184057496 ns/op 31406 jobs/s 584325768 B/op 9302284 allocs/op +BenchmarkEnqueue/Enqueue/1u-100Kt/VarMQ-22 2 2332792788 ns/op 42867 jobs/s 65148524 B/op 1101343 allocs/op +BenchmarkEnqueue/Enqueue/1u-100Kt/Asynq-22 2 3539772315 ns/op 28250 jobs/s 178011480 B/op 2501215 allocs/op +BenchmarkEnqueue/Enqueue/1u-100Kt/VarMQDistributed-22 2 3111788525 ns/op 32136 jobs/s 94078876 B/op 1801422 allocs/op +BenchmarkEnqueue/Enqueue/1u-100Kt/Rmq-22 2 2478423252 ns/op 40348 jobs/s 64382528 B/op 1300967 allocs/op +BenchmarkEnqueue/Enqueue/1u-100Kt/Taskq-22 2 3546222905 ns/op 28199 jobs/s 200423772 B/op 2902498 allocs/op +BenchmarkEnqueue/Enqueue/1u-100Kt/GocraftWork-22 2 2813743100 ns/op 35540 jobs/s 140161420 B/op 2001324 allocs/op +BenchmarkEnqueue/Enqueue/100u-1Kt/VarMQ-22 2 497319834 ns/op 201078 jobs/s 72197000 B/op 1114903 allocs/op +BenchmarkEnqueue/Enqueue/100u-1Kt/Asynq-22 2 811696062 ns/op 123199 jobs/s 185114372 B/op 2517912 allocs/op +BenchmarkEnqueue/Enqueue/100u-1Kt/VarMQDistributed-22 2 698407826 ns/op 143183 jobs/s 101071404 B/op 1815110 allocs/op +BenchmarkEnqueue/Enqueue/100u-1Kt/Rmq-22 2 494882505 ns/op 202068 jobs/s 71396168 B/op 1314731 allocs/op +BenchmarkEnqueue/Enqueue/100u-1Kt/Taskq-22 2 529472407 ns/op 188867 jobs/s 201499304 B/op 2907174 allocs/op +BenchmarkEnqueue/Enqueue/100u-1Kt/GocraftWork-22 2 496777764 ns/op 201297 jobs/s 142279948 B/op 2006900 allocs/op +BenchmarkLatency/LatencyW10C1/1u-1Kt/VarMQ-22 2 168390007 ns/op 3.583 max-ms 0.1425 p50-ms 0.3843 p99-ms 4786096 B/op 89824 allocs/op +BenchmarkLatency/LatencyW10C1/1u-1Kt/Asynq-22 2 994214390165 ns/op 1507 max-ms 995.3 p50-ms 1492 p99-ms 9208528 B/op 182621 allocs/op +BenchmarkLatency/LatencyW10C1/1u-1Kt/VarMQDistributed-22 2 212051525 ns/op 2.183 max-ms 0.1457 p50-ms 0.5407 p99-ms 5600852 B/op 107450 allocs/op +BenchmarkLatency/LatencyW10C1/1u-1Kt/Rmq-22 2 97284939168 ns/op 113.3 max-ms 102.2 p50-ms 112.3 p99-ms 3609100 B/op 76320 allocs/op +BenchmarkLatency/LatencyW10C1/1u-1Kt/Taskq-22 2 1102165634 ns/op 0.6119 max-ms 0.06330 p50-ms 0.1897 p99-ms 5946532 B/op 99985 allocs/op +BenchmarkLatency/LatencyW10C1/1u-1Kt/GocraftWork-22 2 155181875 ns/op 10.80 max-ms 0.09234 p50-ms 0.4743 p99-ms 5382416 B/op 89832 allocs/op +PASS +ok github.com/goptics/benchmarks/redis 6032.314s diff --git a/redis/benchmark_test.go b/redis/benchmark_test.go new file mode 100644 index 0000000..120eb04 --- /dev/null +++ b/redis/benchmark_test.go @@ -0,0 +1,101 @@ +package durable + +import ( + "slices" + "testing" +) + +// BenchmarkDurable is the full matrix: enqueue and drain a workload through +// each subject, for every task, worker count and instance count. +func BenchmarkDurable(b *testing.B) { + url := redisOrSkip(b) + + for _, t := range tasks { + for _, sh := range shapes { + b.Run(t.name+sh.label(), func(b *testing.B) { + for _, w := range workloads { + b.Run(w.name, func(b *testing.B) { + for _, s := range subjects { + if sh.instances > s.maxInstances { + continue + } + + b.Run(s.name, func(b *testing.B) { + for range b.N { + b.StopTimer() + flush(b, url) + b.StartTimer() + + runEndToEnd(b, s, url, w, sh, t) + } + + reportJobsPerSec(b, w) + }) + } + }) + } + }) + } + } +} + +// BenchmarkEnqueue measures producing only; nothing consumes the jobs. +func BenchmarkEnqueue(b *testing.B) { + url := redisOrSkip(b) + + b.Run("Enqueue", func(b *testing.B) { + for _, w := range workloads { + b.Run(w.name, func(b *testing.B) { + for _, s := range subjects { + b.Run(s.name, func(b *testing.B) { + for range b.N { + b.StopTimer() + flush(b, url) + b.StartTimer() + + runEnqueue(b, s, url, w) + } + + reportJobsPerSec(b, w) + }) + } + }) + } + }) +} + +// BenchmarkLatency reports enqueue-to-handled latency, one job in flight. +func BenchmarkLatency(b *testing.B) { + url := redisOrSkip(b) + + b.Run("Latency"+latencyShape.label(), func(b *testing.B) { + b.Run(latencyWorkload.name, func(b *testing.B) { + for _, s := range subjects { + b.Run(s.name, func(b *testing.B) { + var samples []int64 + + for range b.N { + b.StopTimer() + flush(b, url) + b.StartTimer() + + samples = append(samples, runLatency(b, s, url, latencyWorkload.total())...) + } + + slices.Sort(samples) + + const msPerNs = 1e-6 + b.ReportMetric(float64(percentile(samples, 0.50))*msPerNs, "p50-ms") + b.ReportMetric(float64(percentile(samples, 0.99))*msPerNs, "p99-ms") + b.ReportMetric(float64(percentile(samples, 1))*msPerNs, "max-ms") + }) + } + }) + }) +} + +func reportJobsPerSec(b *testing.B, w workload) { + if sec := b.Elapsed().Seconds(); sec > 0 { + b.ReportMetric(float64(w.total()*b.N)/sec, "jobs/s") + } +} diff --git a/redis/compose.yml b/redis/compose.yml new file mode 100644 index 0000000..43ead86 --- /dev/null +++ b/redis/compose.yml @@ -0,0 +1,13 @@ +services: + redis: + # Debian image, pinned to one core: the committed numbers come from this + # setup, with the benchmark client on the other cores (see Taskfile.yml txt). + image: redis:7.2 + cpuset: "14" + ports: + - "6390:6379" + healthcheck: + test: ["CMD", "redis-cli", "ping"] + interval: 1s + timeout: 3s + retries: 30 diff --git a/redis/go.mod b/redis/go.mod new file mode 100644 index 0000000..60cfc2c --- /dev/null +++ b/redis/go.mod @@ -0,0 +1,43 @@ +module github.com/goptics/benchmarks/redis + +go 1.26.0 + +require ( + github.com/adjust/rmq/v5 v5.2.0 + github.com/go-redis/redis/v8 v8.11.5 + github.com/gocraft/work v0.5.1 + github.com/gomodule/redigo v1.9.3 + github.com/goptics/redisq v1.5.0 + github.com/goptics/varmq v1.9.0 + github.com/hibiken/asynq v0.26.0 + github.com/redis/go-redis/v9 v9.23.0 + github.com/vmihailenco/taskq/v3 v3.2.9 +) + +require ( + github.com/alicebob/gopher-json v0.0.0-20230218143504-906a9b012302 // indirect + github.com/alicebob/miniredis/v2 v2.30.4 // indirect + github.com/bsm/redislock v0.7.2 // indirect + github.com/capnm/sysinfo v0.0.0-20130621111458-5909a53897f3 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect + github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect + github.com/go-redis/redis_rate/v9 v9.1.2 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/hashicorp/golang-lru v0.5.4 // indirect + github.com/klauspost/compress v1.15.1 // indirect + github.com/robfig/cron v1.2.0 // indirect + github.com/robfig/cron/v3 v3.0.1 // indirect + github.com/spf13/cast v1.10.0 // indirect + github.com/stretchr/testify v1.12.1 // indirect + github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect + github.com/yuin/gopher-lua v1.1.0 // indirect + go.uber.org/atomic v1.12.0 // indirect + go.yaml.in/yaml/v3 v3.0.5 // indirect + golang.org/x/sys v0.48.0 // indirect + golang.org/x/time v0.14.0 // indirect + google.golang.org/protobuf v1.36.10 // indirect +) + +replace github.com/goptics/varmq => ../../varmq diff --git a/redis/go.sum b/redis/go.sum new file mode 100644 index 0000000..1a8d171 --- /dev/null +++ b/redis/go.sum @@ -0,0 +1,241 @@ +dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= +github.com/adjust/rmq/v5 v5.2.0 h1:ENPC+3i8N/LAvAfHpEpTMVl7q8zmwh4nl+hhxkao6KE= +github.com/adjust/rmq/v5 v5.2.0/go.mod h1:FfA6MzYJHeLbuATsNYaZYZaISyxxADDXQLN9QBroFCw= +github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= +github.com/alicebob/gopher-json v0.0.0-20230218143504-906a9b012302 h1:uvdUDbHQHO85qeSydJtItA4T55Pw6BtAejd0APRJOCE= +github.com/alicebob/gopher-json v0.0.0-20230218143504-906a9b012302/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= +github.com/alicebob/miniredis/v2 v2.30.4 h1:8S4/o1/KoUArAGbGwPxcwf0krlzceva2XVOSchFS7Eo= +github.com/alicebob/miniredis/v2 v2.30.4/go.mod h1:b25qWj4fCEsBeAAR2mlb0ufImGC6uH3VlUfb/HS5zKg= +github.com/aws/aws-sdk-go v1.43.45 h1:2708Bj4uV+ym62MOtBnErm/CDX61C4mFe9V2gXy1caE= +github.com/aws/aws-sdk-go v1.43.45/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= +github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= +github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= +github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= +github.com/bsm/redislock v0.7.2 h1:jggqOio8JyX9FJBKIfjF3fTxAu/v7zC5mAID9LveqG4= +github.com/bsm/redislock v0.7.2/go.mod h1:kS2g0Yvlymc9Dz8V3iVYAtLAaSVruYbAFdYBDrmC5WU= +github.com/capnm/sysinfo v0.0.0-20130621111458-5909a53897f3 h1:IHZ1Le1ejzkmS7Si7dIzJvYDWe+BIoNmqMnfWHBZSVw= +github.com/capnm/sysinfo v0.0.0-20130621111458-5909a53897f3/go.mod h1:M5XHQLu90v2JNm/bW2tdsYar+5vhV0gEcBcmDBNAN1Y= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/containerd/continuity v0.4.5 h1:ZRoN1sXq9u7V6QoHMcVWGhOwDFqZ4B9i5H6un1Wh0x4= +github.com/containerd/continuity v0.4.5/go.mod h1:/lNJvtJKUQStBzpVQ1+rasXO1LAWtUQssk28EZvJ3nE= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= +github.com/docker/cli v27.4.1+incompatible h1:VzPiUlRJ/xh+otB75gva3r05isHMo5wXDfPRi5/b4hI= +github.com/docker/cli v27.4.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/docker v27.1.1+incompatible h1:hO/M4MtV36kzKldqnA37IWhebRA+LnqqcqDja6kVaKY= +github.com/docker/docker v27.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/go-redis/redis/v8 v8.11.4/go.mod h1:2Z2wHZXdQpCDXEGzqMockDpNyYvi2l4Pxt6RJr792+w= +github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= +github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= +github.com/go-redis/redis_rate/v9 v9.1.2 h1:H0l5VzoAtOE6ydd38j8MCq3ABlGLnvvbA1xDSVVCHgQ= +github.com/go-redis/redis_rate/v9 v9.1.2/go.mod h1:oam2de2apSgRG8aJzwJddXbNu91Iyz1m8IKJE2vpvlQ= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-viper/mapstructure/v2 v2.1.0 h1:gHnMa2Y/pIxElCH2GlZZ1lZSsn6XMtufpGyP1XxdC/w= +github.com/go-viper/mapstructure/v2 v2.1.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/gocraft/work v0.5.1 h1:3bRjMiOo6N4zcRgZWV3Y7uX7R22SF+A9bPTk4xRXr34= +github.com/gocraft/work v0.5.1/go.mod h1:pc3n9Pb5FAESPPGfM0nL+7Q1xtgtRnF8rr/azzhQVlM= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/gomodule/redigo v1.9.3 h1:dNPSXeXv6HCq2jdyWfjgmhBdqnR6PRO3m/G05nvpPC8= +github.com/gomodule/redigo v1.9.3/go.mod h1:KsU3hiK/Ay8U42qpaJk+kuNa3C+spxapWpM+ywhcgtw= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/goptics/redisq v1.5.0 h1:sTpnyh6eGvMndf7v5TX5S8a4ffKrChG+lxru/VOkFIA= +github.com/goptics/redisq v1.5.0/go.mod h1:ehYLG02fo5qU8O4Y3h1ZSJ2vDpOClinZgFCZ9AisFfg= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hibiken/asynq v0.26.0 h1:1Zxr92MlDnb1Zt/QR5g2vSCqUS03i95lUfqx5X7/wrw= +github.com/hibiken/asynq v0.26.0/go.mod h1:Qk4e57bTnWDoyJ67VkchuV6VzSM9IQW2nPvAGuDyw58= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/iron-io/iron_go3 v0.0.0-20190916120531-a4a7f74b73ac h1:w5wltlINIIqRTqQ64dASrCo0fM7k9nosPbKCZnkL0W0= +github.com/iron-io/iron_go3 v0.0.0-20190916120531-a4a7f74b73ac/go.mod h1:gyMTRVO+ZkEy7wQDyD++okPsBN2q127EpuShhHMWG54= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/klauspost/compress v1.15.1 h1:y9FcTHGyrebwfP0ZZqFiaxTaiDnUrGkJkI+f583BL1A= +github.com/klauspost/compress v1.15.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/cpuid/v2 v2.4.0 h1:S6Hrbc7+ywsr0r+RLapfGBHfyefhCTwEh3A0tV913Dw= +github.com/klauspost/cpuid/v2 v2.4.0/go.mod h1:19jmZ9mjzoF//ddRSUsv0zfBTJWh3QJh9FNxZTMrGxU= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/sys/user v0.3.0 h1:9ni5DlcW5an3SvRSx4MouotOygvzaXbaSrc/wGDFWPo= +github.com/moby/sys/user v0.3.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= +github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= +github.com/opencontainers/runc v1.2.3 h1:fxE7amCzfZflJO2lHXf4y/y8M1BoAqp+FVmG19oYB80= +github.com/opencontainers/runc v1.2.3/go.mod h1:nSxcWUydXrsBZVYNSkTjoQ/N6rcyTtn+1SD5D4+kRIM= +github.com/ory/dockertest/v3 v3.12.0 h1:3oV9d0sDzlSQfHtIaB5k6ghUCVMVLpAY8hwrqoCyRCw= +github.com/ory/dockertest/v3 v3.12.0/go.mod h1:aKNDTva3cp8dwOWwb9cWuX84aH5akkxXRvO7KCwWVjE= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/redis/go-redis/v9 v9.23.0 h1:/TTVdJa8BRNsybwwGGnmiYktHNlUXtbOQxlWpHBPL3s= +github.com/redis/go-redis/v9 v9.23.0/go.mod h1:EWP2UUk+XDaI1s5nQB5mablZN6vccXlmBQTyfnF87D0= +github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ= +github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= +github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= +github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY= +github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= +github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= +github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= +github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= +github.com/vmihailenco/taskq/v3 v3.2.9 h1:QE1O8IJlh4xvSB9MJsnEBzNzmJc61y320xAyBeQZ/40= +github.com/vmihailenco/taskq/v3 v3.2.9/go.mod h1:ZoRbkYMZWEUKtKvYlLGKiaRQKUjdvwWAIs/WiW1Nwtg= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/gopher-lua v1.1.0 h1:BojcDhfyDWgU2f2TOzYK/g5p2gxMrku8oupLDqlnSqE= +github.com/yuin/gopher-lua v1.1.0/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= +github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs= +github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s= +go.uber.org/atomic v1.12.0 h1:BvcXdFKuviU4fTL/f+SxdQ5qJX/Jix8pAkgdUcb3XOE= +go.uber.org/atomic v1.12.0/go.mod h1:I6c4cg+6HCxRjfjSsYtApoFILnpc0CGUdGkXVqbYVNk= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.48.0 h1:bbX/i/6MgT9BVLM9RT1thmxL04yeTAhbEz4SyadbXoo= +golang.org/x/sys v0.48.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI= +golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE= +google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/redis/gocraft.go b/redis/gocraft.go new file mode 100644 index 0000000..ebd8978 --- /dev/null +++ b/redis/gocraft.go @@ -0,0 +1,69 @@ +package durable + +import ( + "github.com/gocraft/work" + "github.com/gomodule/redigo/redis" +) + +const ( + gocraftNamespace = "bench" + gocraftJob = "bench" +) + +// gocraftCtx is the context type NewWorkerPool requires; handlers don't use it. +type gocraftCtx struct{} + +// gocraftPool builds the redigo pool gocraft/work needs, on its own +// connections. Wait makes Get block at MaxActive instead of failing (the +// default, which would turn into logged errors). +func gocraftPool(url string, size int) *redis.Pool { + return &redis.Pool{ + MaxActive: size, + MaxIdle: size, + Wait: true, + Dial: func() (redis.Conn, error) { return redis.DialURL(url) }, + } +} + +// gocraftProducer pushes one job per payload; the marshaled JSON rides as the +// string argument "p". gocraft/work logs errors with fmt.Printf to stdout +// (log.go, logError) and has no hook for it, but the enqueue path never calls +// it: errors are returned. +func gocraftProducer(url string) (enqueueFunc, func()) { + pool := gocraftPool(url, poolSize(0)) + e := work.NewEnqueuer(gocraftNamespace, pool) + + return func(p payload) error { + _, err := e.Enqueue(gocraftJob, work.Q{"p": string(p.marshal())}) + + return err + }, func() { + _ = pool.Close() + } +} + +// gocraftConsumer starts one worker pool with workers worker goroutines. The +// handler returns nil, so a job is never retried. +func gocraftConsumer(url string, workers int, h handler) (enqueueFunc, func()) { + pool := gocraftPool(url, poolSize(workers)) + + wp := work.NewWorkerPool(gocraftCtx{}, uint(workers), gocraftNamespace, pool) + wp.Job(gocraftJob, func(job *work.Job) error { + if p, err := unmarshalPayload([]byte(job.ArgString("p"))); err == nil { + h(p) + } + + return nil + }) + wp.Start() + + return nil, func() { + // Stop hands a stop message to every worker, observer, the heartbeater, + // both requeuers, the dead pool reaper and the periodic enqueuer, and + // waits for each reply (worker_pool.go, Stop), so none is left running. + // A worker finishes its current job first. The one goroutine it does not + // wait for is the known-jobs SADD that Start launches. + wp.Stop() + _ = pool.Close() + } +} diff --git a/redis/gocraft_test.go b/redis/gocraft_test.go new file mode 100644 index 0000000..e9e5ee3 --- /dev/null +++ b/redis/gocraft_test.go @@ -0,0 +1,115 @@ +package durable + +import ( + "context" + "io" + "os" + "runtime" + "strings" + "sync" + "sync/atomic" + "testing" + "time" +) + +// gocraftGoroutines counts goroutines still inside gocraft/work. +func gocraftGoroutines() int { + buf := make([]byte, 1<<20) + buf = buf[:runtime.Stack(buf, true)] + + n := 0 + + for g := range strings.SplitSeq(string(buf), "\n\n") { + if strings.Contains(g, "gocraft/work.") { + n++ + } + } + + return n +} + +// TestGocraftStopLeavesNothingRunning pins that Stop plus pool.Close leave no +// gocraft/work goroutine (worker, observer, heartbeater, requeuers, dead pool +// reaper, periodic enqueuer) and nothing that writes to Redis afterwards: a +// key appearing after FLUSHDB would leak into the next round. It also pins +// that nothing reaches os.Stdout, where the library's logError prints. +func TestGocraftStopLeavesNothingRunning(t *testing.T) { + url := redisOrSkip(t) + flush(t, url) + + r, w, err := os.Pipe() + if err != nil { + t.Fatal(err) + } + + closeW := sync.OnceFunc(func() { _ = w.Close() }) + t.Cleanup(closeW) + + stdout := os.Stdout + os.Stdout = w + t.Cleanup(func() { os.Stdout = stdout }) + + captured := make(chan string, 1) + + go func() { + b, _ := io.ReadAll(r) + captured <- string(b) + }() + + var seen atomic.Int64 + + _, consumerStop := gocraftConsumer(url, 5, func(payload) { seen.Add(1) }) + stop := sync.OnceFunc(consumerStop) + t.Cleanup(stop) + + enqueue, producerClose := gocraftProducer(url) + closeProducer := sync.OnceFunc(producerClose) + t.Cleanup(closeProducer) + for i := range 20 { + if err := enqueue(newPayload(int64(i))); err != nil { + t.Fatal(err) + } + } + + for deadline := time.Now().Add(10 * time.Second); seen.Load() < 20 && time.Now().Before(deadline); { + time.Sleep(10 * time.Millisecond) + } + + n := seen.Load() + + closeProducer() + stop() + + os.Stdout = stdout + closeW() + + if out := <-captured; out != "" { + t.Errorf("gocraft/work wrote to stdout: %q", out) + } + + if n != 20 { + t.Fatalf("consumed %d of 20 jobs", n) + } + + deadline := time.Now().Add(time.Second) + for gocraftGoroutines() != 0 && time.Now().Before(deadline) { + time.Sleep(5 * time.Millisecond) + } + + if g := gocraftGoroutines(); g != 0 { + t.Fatalf("%d gocraft/work goroutines still running after stop", g) + } + + flush(t, url) + + // Longer than the 5 s heartbeat and the 1 s observer and requeuer ticks. + time.Sleep(6 * time.Second) + + c := rawClient(url, 1) + defer c.Close() + + if n, err := c.DBSize(context.Background()).Result(); err != nil || n != 0 { + keys, _ := c.Keys(context.Background(), "*").Result() + t.Fatalf("DBSIZE = %d (err %v) after stop and flush, keys %v", n, err, keys) + } +} diff --git a/redis/harness_test.go b/redis/harness_test.go new file mode 100644 index 0000000..ca6c545 --- /dev/null +++ b/redis/harness_test.go @@ -0,0 +1,226 @@ +package durable + +import ( + "context" + "io" + "log" + "os" + "slices" + "sync" + "sync/atomic" + "testing" + "time" + + "github.com/redis/go-redis/v9" +) + +// nopLogger silences go-redis v9's internal logger. +type nopLogger struct{} + +func (nopLogger) Printf(context.Context, string, ...any) {} + +func TestMain(m *testing.M) { + // redisq logs through the std logger, and `go test` sends stderr to the same + // file as stdout, so it must stay quiet. gocraft/work does not use it: it + // prints to stdout, but only when a call fails. + log.SetOutput(io.Discard) + redis.SetLogger(nopLogger{}) + + os.Exit(m.Run()) +} + +func redisURL() string { + if u := os.Getenv("REDIS_URL"); u != "" { + return u + } + + return "redis://localhost:6390/0" +} + +// redisOrSkip returns the Redis URL, or skips tb when Redis isn't reachable. +func redisOrSkip(tb testing.TB) string { + tb.Helper() + + url := redisURL() + ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second) + defer cancel() + + c := rawClient(url, 1) + defer c.Close() + + if err := c.Ping(ctx).Err(); err != nil { + tb.Skipf("redis not reachable at %s: run `task redis:up` or set REDIS_URL", url) + } + + return url +} + +func flush(tb testing.TB, url string) { + tb.Helper() + + c := rawClient(url, 1) + defer c.Close() + + if err := c.FlushDB(context.Background()).Err(); err != nil { + tb.Fatalf("flushdb: %v", err) + } +} + +// produce spawns one goroutine per producer. Each enqueues jobsEach payloads +// until it finishes, fails or stop is called, and reports at most one error on +// errs. done closes once every producer goroutine has returned. +func produce(enqueue enqueueFunc, w workload) (errs <-chan error, done <-chan struct{}, stop func()) { + errCh := make(chan error, w.producers) + doneCh := make(chan struct{}) + + var ( + wg sync.WaitGroup + stopped atomic.Bool + ) + + for i := range w.producers { + wg.Go(func() { + for j := range w.jobsEach { + if stopped.Load() { + return + } + + if err := enqueue(newPayload(int64(i*w.jobsEach + j))); err != nil { + errCh <- err + + return + } + } + }) + } + + go func() { + wg.Wait() + close(doneCh) + }() + + return errCh, doneCh, func() { stopped.Store(true) } +} + +// quiesce stops the producers and waits for any in-flight enqueue to return, +// so the caller's deferred closeFn/stop never races a running enqueue. The +// wait is bounded so a wedged library can't hang the run. +func quiesce(stop func(), done <-chan struct{}) { + stop() + + select { + case <-done: + case <-time.After(30 * time.Second): + } +} + +// runEndToEnd starts sh.instances consumers, enqueues the workload and waits +// until every job has been handled. It returns the duplicate-delivery count. +// tb is only touched from the calling goroutine. +func runEndToEnd(tb testing.TB, s durableSubject, url string, w workload, sh shape, t task) (dups int64) { + tb.Helper() + + c := newCollector(w.total(), t) + + var enqueue enqueueFunc + + for i := range sh.instances { + enq, stop := s.consumer(url, sh.workers, c.handle) + defer stop() + + if i == 0 { + enqueue = enq + } + } + + if enqueue == nil { + enq, closeFn := s.producer(url) + defer closeFn() + + enqueue = enq + } + + errs, done, stopProducers := produce(enqueue, w) + defer quiesce(stopProducers, done) // runs before the closeFn/stop defers above + + select { + case <-c.done(): + case err := <-errs: + tb.Fatalf("%s: enqueue: %v", s.name, err) + case <-time.After(5 * time.Minute): + if err := c.wait(0); err != nil { + tb.Fatalf("%s: %v", s.name, err) + } + } + + return c.dups() +} + +// runEnqueue measures producing only: nothing consumes the jobs. +func runEnqueue(tb testing.TB, s durableSubject, url string, w workload) { + tb.Helper() + + enqueue, closeFn := s.producer(url) + defer closeFn() + + errs, done, stopProducers := produce(enqueue, w) + defer quiesce(stopProducers, done) // runs before closeFn + + select { + case <-done: + case err := <-errs: + tb.Fatalf("%s: enqueue: %v", s.name, err) + } + + // done can win the select over a pending error; drain it. + select { + case err := <-errs: + tb.Fatalf("%s: enqueue: %v", s.name, err) + default: + } +} + +// runLatency enqueues n jobs one at a time, waiting for each to be handled, +// and returns the enqueue-to-handled latencies in ns, sorted. +func runLatency(tb testing.TB, s durableSubject, url string, n int) []int64 { + tb.Helper() + + // Buffered so a late or duplicate delivery never blocks a worker (and + // with it, stop). + got := make(chan int64, 1) + h := func(p payload) { + select { + case got <- time.Now().UnixNano() - p.EnqueuedAt: + default: + } + } + + enqueue, stop := s.consumer(url, 10, h) + defer stop() + + if enqueue == nil { + enq, closeFn := s.producer(url) + defer closeFn() + + enqueue = enq + } + + out := make([]int64, 0, n) + + for i := range n { + if err := enqueue(newPayload(int64(i))); err != nil { + tb.Fatalf("%s: enqueue %d: %v", s.name, i, err) + } + + select { + case d := <-got: + out = append(out, d) + case <-time.After(10 * time.Second): + tb.Fatalf("%s: job %d not handled within 10s", s.name, i) + } + } + + slices.Sort(out) + + return out +} diff --git a/redis/rmq.go b/redis/rmq.go new file mode 100644 index 0000000..9695400 --- /dev/null +++ b/redis/rmq.go @@ -0,0 +1,114 @@ +package durable + +import ( + "time" + + "github.com/adjust/rmq/v5" +) + +const ( + rmqQueue = "bench" + // rmq has no default for either setting. Both come from rmq v5.2.0's + // example/consumer/main.go (prefetchLimit 1000, pollDuration 100ms). The + // prefetch is raised to 2*workers when that is larger, because rmq's README + // says the prefetch limit should always exceed the consumer count. + rmqPollDuration = 100 * time.Millisecond + rmqMinPrefetch = 1000 +) + +// rmqOpen opens an rmq connection on its own go-redis client. The tag need not +// be unique: openConnection appends a random suffix (rmq/connection.go). rmq +// never stops a connection's heartbeat goroutine (stopHeartbeat is +// unexported), so after the client is closed it fails once a second for +// rmq.HeartbeatErrorLimit ticks and then sends one blocking error to errChan. +// The 1024-entry buffer lets that last send complete with no reader, so the +// goroutine exits instead of leaking. stopDrain ends the reader and returns +// only after it has exited. +func rmqOpen(url string, pool int) (rmq.Connection, func(), func()) { + client := rawClient(url, pool) + errChan := make(chan error, 1024) + quit := make(chan struct{}) + exited := make(chan struct{}) + + go func() { + defer close(exited) + + for { + select { + case <-errChan: + case <-quit: + return + } + } + }() + + conn, err := rmq.OpenConnectionWithRedisClient("bench", client, errChan) + if err != nil { + panic(err) // the URL was already used by redisOrSkip + } + + stopDrain := func() { + close(quit) + <-exited + } + + return conn, stopDrain, func() { _ = client.Close() } +} + +// rmqProducer publishes the marshaled payload as a string, with one LPUSH. +func rmqProducer(url string) (enqueueFunc, func()) { + conn, stopDrain, closeClient := rmqOpen(url, 0) + + q, err := conn.OpenQueue(rmqQueue) + if err != nil { + panic(err) + } + + return func(p payload) error { + return q.Publish(string(p.marshal())) + }, func() { + <-conn.StopAllConsuming() + stopDrain() + closeClient() + } +} + +// rmqConsumer starts one rmq queue consumer with workers consumer goroutines. The ack comes after the handler. +func rmqConsumer(url string, workers int, h handler) (enqueueFunc, func()) { + conn, stopDrain, closeClient := rmqOpen(url, poolSize(workers)) + + q, err := conn.OpenQueue(rmqQueue) + if err != nil { + panic(err) + } + + if err := q.StartConsuming(int64(max(rmqMinPrefetch, 2*workers)), rmqPollDuration); err != nil { + panic(err) + } + + for range workers { + _, err := q.AddConsumerFunc("bench", func(d rmq.Delivery) { + if p, err := unmarshalPayload([]byte(d.Payload())); err == nil { + h(p) + } + + // An ack can only fail with rmq.ErrorNotFound (entry already gone, + // e.g. FLUSHDB under a late consumer) or ErrorConsumingStopped. Nothing + // useful to do, and nothing may be logged. + _ = d.Ack() + }) + if err != nil { + panic(err) + } + } + + return nil, func() { + // Waits for every consumer goroutine to return from its current Consume. + // The queue's fetch goroutine is not waited on (queue.go, consume): it + // exits at its next check, up to one poll sleep later. Closing the + // client first makes anything it still sends fail. + <-conn.StopAllConsuming() + closeClient() + stopDrain() + } +} diff --git a/redis/rmq_test.go b/redis/rmq_test.go new file mode 100644 index 0000000..bd5618d --- /dev/null +++ b/redis/rmq_test.go @@ -0,0 +1,45 @@ +package durable + +import ( + "runtime" + "strings" + "testing" + "time" +) + +// rmqPollers counts goroutines still running rmq's fetch loop or a consumer. +func rmqPollers() int { + buf := make([]byte, 1<<20) + buf = buf[:runtime.Stack(buf, true)] + + n := 0 + + for g := range strings.SplitSeq(string(buf), "\n\n") { + if strings.Contains(g, "rmq/v5.(*redisQueue).consume") || strings.Contains(g, "rmq/v5.(*redisQueue).consumerConsume") { + n++ + } + } + + return n +} + +func TestRmqStopEndsPollers(t *testing.T) { + url := redisOrSkip(t) + + _, stop := rmqConsumer(url, 5, func(payload) {}) + if rmqPollers() == 0 { + t.Fatal("no rmq goroutines running before stop") + } + + stop() + + // the fetch loop is not waited on by rmq, so it may take up to one poll sleep + deadline := time.Now().Add(2 * time.Second) + for rmqPollers() != 0 && time.Now().Before(deadline) { + time.Sleep(5 * time.Millisecond) + } + + if n := rmqPollers(); n != 0 { + t.Fatalf("%d rmq poller goroutines still running after stop", n) + } +} diff --git a/redis/subjects.go b/redis/subjects.go new file mode 100644 index 0000000..922a618 --- /dev/null +++ b/redis/subjects.go @@ -0,0 +1,40 @@ +package durable + +import "time" + +var workloads = []workload{ + {"1u-100Kt", 1, 100_000}, + {"100u-1Kt", 100, 1_000}, +} + +// shapes is every workers x instances combination of the matrix. +var shapes = func() []shape { + var out []shape + for _, w := range []int{10, 100, 1000} { + for _, c := range []int{1, 4} { + out = append(out, shape{w, c}) + } + } + + return out +}() + +var tasks = []task{ + {name: "Noop"}, + {name: "Sleep1ms", sleep: time.Millisecond}, +} + +var ( + latencyWorkload = workload{"1u-1Kt", 1, 1_000} + latencyShape = shape{10, 1} +) + +// subjects is every queue under test; each adapter file appends its own. +var subjects = []durableSubject{ + {name: "VarMQ", maxInstances: 1, producer: varmqProducer, consumer: varmqConsumer}, + {name: "Asynq", maxInstances: 4, producer: asynqProducer, consumer: asynqConsumer}, + {name: "VarMQDistributed", maxInstances: 4, producer: varmqDistributedProducer, consumer: varmqDistributedConsumer}, + {name: "Rmq", maxInstances: 4, producer: rmqProducer, consumer: rmqConsumer}, + {name: "Taskq", maxInstances: 4, producer: taskqProducer, consumer: taskqConsumer}, + {name: "GocraftWork", maxInstances: 4, producer: gocraftProducer, consumer: gocraftConsumer}, +} diff --git a/redis/subjects_test.go b/redis/subjects_test.go new file mode 100644 index 0000000..7483f71 --- /dev/null +++ b/redis/subjects_test.go @@ -0,0 +1,199 @@ +package durable + +import ( + "errors" + "fmt" + "runtime" + "slices" + "strings" + "sync" + "sync/atomic" + "testing" + "time" +) + +var wantSubjects = []string{"VarMQ", "Asynq", "VarMQDistributed", "Rmq", "Taskq", "GocraftWork"} // each later task appends its name + +func TestSubjectNames(t *testing.T) { + var got []string + for _, s := range subjects { + got = append(got, s.name) + } + + if !slices.Equal(got, wantSubjects) { + t.Fatalf("subjects = %v, want %v", got, wantSubjects) + } +} + +func TestRedisOrSkipSkipsWhenDown(t *testing.T) { + t.Setenv("REDIS_URL", "redis://localhost:1/0") + + var inner *testing.T + t.Run("inner", func(t *testing.T) { + inner = t + redisOrSkip(t) + }) + + if !inner.Skipped() { + t.Fatal("redisOrSkip did not skip with Redis unreachable") + } +} + +// recordingTB records failures instead of failing the real test. Stopping +// calls end the goroutine, like the real testing.TB does. +type recordingTB struct { + testing.TB + mu sync.Mutex + msgs []string +} + +func (r *recordingTB) record(msg string) { + r.mu.Lock() + r.msgs = append(r.msgs, msg) + r.mu.Unlock() +} + +func (r *recordingTB) Helper() {} +func (r *recordingTB) Logf(f string, a ...any) {} +func (r *recordingTB) Log(a ...any) {} +func (r *recordingTB) Errorf(f string, a ...any) { r.record(fmt.Sprintf(f, a...)) } +func (r *recordingTB) Error(a ...any) { r.record(fmt.Sprint(a...)) } +func (r *recordingTB) Fatalf(f string, a ...any) { r.record(fmt.Sprintf(f, a...)); runtime.Goexit() } +func (r *recordingTB) Fatal(a ...any) { r.record(fmt.Sprint(a...)); runtime.Goexit() } +func (r *recordingTB) FailNow() { runtime.Goexit() } +func (r *recordingTB) Skipf(f string, a ...any) { + r.record("skip: " + fmt.Sprintf(f, a...)) + runtime.Goexit() +} +func (r *recordingTB) Skip(a ...any) { r.record("skip: " + fmt.Sprint(a...)); runtime.Goexit() } +func (r *recordingTB) SkipNow() { runtime.Goexit() } + +func TestRunEndToEndFailsOnEnqueueError(t *testing.T) { + url := redisOrSkip(t) + bad := durableSubject{ + name: "Bad", maxInstances: 1, + producer: func(string) (enqueueFunc, func()) { + return func(payload) error { return errors.New("boom") }, func() {} + }, + consumer: func(string, int, handler) (enqueueFunc, func()) { return nil, func() {} }, + } + + fake := &recordingTB{TB: t} + done := make(chan struct{}) + + go func() { + defer close(done) + runEndToEnd(fake, bad, url, workload{"1u-10t", 1, 10}, shape{1, 1}, tasks[0]) + }() + <-done + + fake.mu.Lock() + defer fake.mu.Unlock() + + if len(fake.msgs) != 1 || !strings.Contains(fake.msgs[0], "boom") { + t.Fatalf("want one recorded failure mentioning boom, got %q", fake.msgs) + } +} + +// slowFailProducer fails its first enqueue and makes every other one slow, so +// the remaining producers are mid-enqueue when the failure lands. closeFn +// records whether any enqueue was still running. +func slowFailProducer() (producerFactory, *atomic.Int64, *atomic.Int64) { + var calls, inflight, inflightAtClose atomic.Int64 + + return func(string) (enqueueFunc, func()) { + return func(payload) error { + inflight.Add(1) + defer inflight.Add(-1) + + if calls.Add(1) == 1 { + return errors.New("boom") + } + + time.Sleep(20 * time.Millisecond) + + return nil + }, func() { + inflightAtClose.Store(inflight.Load()) + } + }, &calls, &inflightAtClose +} + +func TestRunQuiescesProducersBeforeClose(t *testing.T) { + url := redisOrSkip(t) + w := workload{"4u-100t", 4, 100} + idle := func(string, int, handler) (enqueueFunc, func()) { return nil, func() {} } + + runs := map[string]func(tb testing.TB, s durableSubject){ + "EndToEnd": func(tb testing.TB, s durableSubject) { runEndToEnd(tb, s, url, w, shape{1, 1}, tasks[0]) }, + "Enqueue": func(tb testing.TB, s durableSubject) { runEnqueue(tb, s, url, w) }, + } + + for name, run := range runs { + t.Run(name, func(t *testing.T) { + producer, calls, inflightAtClose := slowFailProducer() + s := durableSubject{name: "Slow", maxInstances: 1, producer: producer, consumer: idle} + + fake := &recordingTB{TB: t} + done := make(chan struct{}) + + go func() { + defer close(done) + run(fake, s) + }() + <-done + + if len(fake.msgs) != 1 || !strings.Contains(fake.msgs[0], "boom") { + t.Fatalf("want one failure mentioning boom, got %q", fake.msgs) + } + + if n := inflightAtClose.Load(); n != 0 { + t.Fatalf("%d enqueue calls still in flight when closeFn ran", n) + } + + // stop took effect: far fewer calls than the 400 jobs. + if n := calls.Load(); n >= int64(w.total()) { + t.Fatalf("producers kept enqueuing after the failure: %d calls", n) + } + }) + } +} + +func TestSubjects(t *testing.T) { + url := redisOrSkip(t) + w := workload{"4u-250t", 4, 250} + + for _, s := range subjects { + t.Run(s.name, func(t *testing.T) { + for _, instances := range slices.Compact([]int{1, s.maxInstances}) { + t.Run(fmt.Sprintf("C%d", instances), func(t *testing.T) { + // Two back-to-back rounds: leftover consumers from the first + // would steal jobs from the second. + for round := range 2 { + flush(t, url) + + if dups := runEndToEnd(t, s, url, w, shape{10, instances}, tasks[0]); dups != 0 { + t.Fatalf("round %d: %d duplicates", round, dups) + } + } + }) + } + + flush(t, url) + runEnqueue(t, s, url, w) + + flush(t, url) + + lat := runLatency(t, s, url, 50) + if len(lat) != 50 { + t.Fatalf("len(latencies) = %d, want 50", len(lat)) + } + + for _, v := range lat { + if v <= 0 { + t.Fatalf("non-positive latency %d", v) + } + } + }) + } +} diff --git a/redis/taskq.go b/redis/taskq.go new file mode 100644 index 0000000..8948fba --- /dev/null +++ b/redis/taskq.go @@ -0,0 +1,119 @@ +package durable + +import ( + "context" + "io" + "log" + "sync/atomic" + + redis8 "github.com/go-redis/redis/v8" + "github.com/vmihailenco/taskq/v3" + taskqredis "github.com/vmihailenco/taskq/v3/redisq" +) + +const ( + taskqQueue = "bench" + taskqTaskName = "bench" +) + +// redis8Silent drops go-redis v8's internal log lines (pool and connection +// errors after a client is closed). +type redis8Silent struct{} + +func (redis8Silent) Printf(context.Context, string, ...any) {} + +func init() { + // taskq and go-redis v8 each log to stderr from package-level loggers. + taskq.SetLogger(log.New(io.Discard, "", 0)) + redis8.SetLogger(redis8Silent{}) +} + +// taskqHandler is the handler of the current consumer round. taskq's task +// registry is global and a second RegisterTask of the same name panics, so the +// task is registered once below and routes to whatever handler is current. All +// instances of one run share one handler, and the harness stops a round's +// instances before the next round starts. +var taskqHandler atomic.Pointer[handler] + +var _ = taskq.RegisterTask(&taskq.TaskOptions{ + Name: taskqTaskName, + Handler: func(b []byte) error { + // Always nil: a returned error would make taskq retry the job. + if h := taskqHandler.Load(); h != nil { + if p, err := unmarshalPayload(b); err == nil { + (*h)(p) + } + } + + return nil + }, +}) + +// taskqClient builds the go-redis v8 client taskq needs, on its own pool. +func taskqClient(url string, pool int) *redis8.Client { + opt, err := redis8.ParseURL(url) + if err != nil { + panic(err) // the URL was already used by redisOrSkip + } + + if pool > 0 { + opt.PoolSize = pool + } + + return redis8.NewClient(opt) +} + +// taskqOpen registers the "bench" queue on a factory of its own (queue names +// are unique per factory), so each instance closes only its own queue. +// NewQueue starts three scheduler goroutines (redisq/queue.go); they are not +// waited on by Close, but they exit at their next wake once the queue is +// closed, and every Redis call they make after the client closes just fails. +func taskqOpen(url string, pool int, workers int32) (taskq.Queue, taskq.Factory, *redis8.Client) { + client := taskqClient(url, pool) + f := taskqredis.NewFactory() + q := f.RegisterQueue(&taskq.QueueOptions{ + Name: taskqQueue, + Redis: client, + MinNumWorker: workers, + MaxNumWorker: workers, + }) + + return q, f, client +} + +// taskqProducer adds one message per payload, args being the marshaled JSON. +func taskqProducer(url string) (enqueueFunc, func()) { + q, f, client := taskqOpen(url, 0, 0) + task := taskq.Tasks.Get(taskqTaskName) + + return func(p payload) error { + return q.Add(task.WithArgs(context.Background(), p.marshal())) + }, func() { + _ = f.Close() + _ = client.Close() + } +} + +// taskqConsumer starts one taskq consumer with workers goroutines: min and max +// worker counts are both pinned to workers, which also turns off taskq's +// autotuning (consumer.go, Start). +func taskqConsumer(url string, workers int, h handler) (enqueueFunc, func()) { + taskqHandler.Store(&h) + + q, f, client := taskqOpen(url, poolSize(workers), int32(workers)) + + ctx, cancel := context.WithCancel(context.Background()) + if err := q.Consumer().Start(ctx); err != nil { + panic(err) + } + + return nil, func() { + // Stop waits for the fetcher (up to one WaitTimeout block) and for the + // workers. Closing the factory then closes the queue, and only after + // that the client. + _ = q.Consumer().Stop() + _ = f.Close() + cancel() + _ = client.Close() + } +} diff --git a/redis/taskq_test.go b/redis/taskq_test.go new file mode 100644 index 0000000..182f434 --- /dev/null +++ b/redis/taskq_test.go @@ -0,0 +1,51 @@ +package durable + +import ( + "context" + "sync/atomic" + "testing" + "time" +) + +// TestTaskqStopLeavesNothingWriting pins that no taskq goroutine (fetcher, +// worker, or one of the queue's three scheduler loops, which Close does not +// wait for) writes to Redis after stop returns: a key appearing after FLUSHDB +// would leak into the next round. +func TestTaskqStopLeavesNothingWriting(t *testing.T) { + url := redisOrSkip(t) + flush(t, url) + + var seen atomic.Int64 + + _, stop := taskqConsumer(url, 5, func(payload) { seen.Add(1) }) + + enqueue, closeProducer := taskqProducer(url) + for i := range 20 { + if err := enqueue(newPayload(int64(i))); err != nil { + t.Fatal(err) + } + } + + for deadline := time.Now().Add(10 * time.Second); seen.Load() < 20 && time.Now().Before(deadline); { + time.Sleep(10 * time.Millisecond) + } + + if n := seen.Load(); n != 20 { + t.Fatalf("consumed %d of 20 jobs", n) + } + + closeProducer() + stop() + flush(t, url) + + // The scheduler loops sleep 1 to 1.5 s between passes. + time.Sleep(3 * time.Second) + + c := rawClient(url, 1) + defer c.Close() + + if n, err := c.DBSize(context.Background()).Result(); err != nil || n != 0 { + keys, _ := c.Keys(context.Background(), "*").Result() + t.Fatalf("DBSIZE = %d (err %v) after stop and flush, keys %v", n, err, keys) + } +} diff --git a/redis/types.go b/redis/types.go new file mode 100644 index 0000000..3cca9a3 --- /dev/null +++ b/redis/types.go @@ -0,0 +1,171 @@ +package durable + +import ( + "encoding/json" + "fmt" + "math" + "net/url" + "runtime" + "sync/atomic" + "time" + + "github.com/redis/go-redis/v9" +) + +// payload is the job body every subject carries through Redis. +type payload struct { + ID int64 `json:"id"` + EnqueuedAt int64 `json:"t"` + Pad [48]byte `json:"pad"` +} + +func newPayload(id int64) payload { + return payload{ID: id, EnqueuedAt: time.Now().UnixNano()} +} + +func (p payload) marshal() []byte { + b, err := json.Marshal(p) + if err != nil { + panic(err) // a fixed-shape struct can't fail to marshal + } + + return b +} + +func unmarshalPayload(b []byte) (payload, error) { + var p payload + err := json.Unmarshal(b, &p) + + return p, err +} + +// task is the work a handler does for each job. +type task struct { + name string + sleep time.Duration +} + +func (t task) run() { + if t.sleep > 0 { + time.Sleep(t.sleep) + } +} + +type handler func(p payload) +type enqueueFunc func(p payload) error + +type producerFactory func(url string) (enqueue enqueueFunc, closeFn func()) + +// consumerFactory starts workers consuming from Redis. enqueue is nil for every +// subject except VarMQ, whose producer must be the consumer's bound queue. +type consumerFactory func(url string, workers int, h handler) (enqueue enqueueFunc, stop func()) + +type durableSubject struct { + name string + maxInstances int + producer producerFactory + consumer consumerFactory +} + +type workload struct { + name string + producers, jobsEach int +} + +func (w workload) total() int { return w.producers * w.jobsEach } + +// shape is one worker/instance combination of the matrix. +type shape struct{ workers, instances int } + +// label names the shape in benchmark names, e.g. "W100C4". +func (s shape) label() string { + return fmt.Sprintf("W%dC%d", s.workers, s.instances) +} + +// collector counts unique job IDs and runs the task for each. A redelivered +// ID is counted as a duplicate and skipped. +type collector struct { + t task + n int64 + seen []atomic.Bool + unique atomic.Int64 + dupCount atomic.Int64 + doneCh chan struct{} +} + +func newCollector(n int, t task) *collector { + return &collector{ + t: t, + n: int64(n), + seen: make([]atomic.Bool, n), + doneCh: make(chan struct{}), + } +} + +func (c *collector) handle(p payload) { + if p.ID < 0 || p.ID >= c.n || !c.seen[p.ID].CompareAndSwap(false, true) { + c.dupCount.Add(1) + return + } + + c.t.run() + + if c.unique.Add(1) == c.n { + close(c.doneCh) + } +} + +// done is closed once n unique IDs have been handled. +func (c *collector) done() <-chan struct{} { return c.doneCh } + +func (c *collector) wait(timeout time.Duration) error { + select { + case <-c.doneCh: + return nil + case <-time.After(timeout): + return fmt.Errorf("got %d/%d jobs (%d duplicates) after %s", + c.unique.Load(), c.n, c.dupCount.Load(), timeout) + } +} + +func (c *collector) dups() int64 { return c.dupCount.Load() } + +// percentile returns the nearest-rank value of an ascending slice; q=1 is the max. +func percentile(sorted []int64, q float64) int64 { + i := int(math.Ceil(q*float64(len(sorted)))) - 1 + + return sorted[min(max(i, 0), len(sorted)-1)] +} + +// poolSize is the Redis pool size per instance: the worker count, but never +// below 10 connections per CPU. +func poolSize(workers int) int { + return max(workers, 10*runtime.GOMAXPROCS(0)) +} + +// withPoolSize adds or replaces the pool_size query param of a Redis URL. +func withPoolSize(rawURL string, n int) string { + u, err := url.Parse(rawURL) + if err != nil { + return rawURL + } + + q := u.Query() + q.Set("pool_size", fmt.Sprint(n)) + u.RawQuery = q.Encode() + + return u.String() +} + +func rawClient(url string, pool int) *redis.Client { + opt, err := redis.ParseURL(url) + if err != nil { + panic(err) // the URL was already used by redisOrSkip + } + + if pool > 0 { + opt.PoolSize = pool + } + + return redis.NewClient(opt) +} diff --git a/redis/types_test.go b/redis/types_test.go new file mode 100644 index 0000000..efffe4a --- /dev/null +++ b/redis/types_test.go @@ -0,0 +1,99 @@ +package durable + +import ( + "net/url" + "strings" + "testing" + "time" +) + +func TestShapeLabel(t *testing.T) { + if got := (shape{workers: 100, instances: 4}).label(); got != "W100C4" { + t.Fatal(got) + } +} + +func TestPercentile(t *testing.T) { + s := make([]int64, 100) + for i := range s { + s[i] = int64(i + 1) + } + + for _, c := range []struct { + q float64 + want int64 + }{{0.5, 50}, {0.99, 99}, {1, 100}} { + if got := percentile(s, c.q); got != c.want { + t.Fatalf("q=%v: got %d, want %d", c.q, got, c.want) + } + } + + for _, q := range []float64{0.5, 0.99, 1} { + if got := percentile([]int64{7}, q); got != 7 { + t.Fatalf("single element q=%v: got %d, want 7", q, got) + } + } +} + +func TestPayloadRoundTrip(t *testing.T) { + p := newPayload(42) + p.Pad[0], p.Pad[47] = 1, 2 + + got, err := unmarshalPayload(p.marshal()) + if err != nil { + t.Fatal(err) + } + + if got != p { + t.Fatalf("got %+v, want %+v", got, p) + } +} + +func TestWithPoolSize(t *testing.T) { + if got := withPoolSize("redis://localhost:6390/0", 100); got != "redis://localhost:6390/0?pool_size=100" { + t.Fatal(got) + } + + u, err := url.Parse(withPoolSize("redis://localhost:6390/0?protocol=3", 5)) + if err != nil { + t.Fatal(err) + } + + if q := u.Query(); q.Get("protocol") != "3" || q.Get("pool_size") != "5" { + t.Fatal(u.RawQuery) + } + + u, err = url.Parse(withPoolSize("redis://localhost:6390/0?pool_size=1", 5)) + if err != nil { + t.Fatal(err) + } + + if vals := u.Query()["pool_size"]; len(vals) != 1 || vals[0] != "5" { + t.Fatal(u.RawQuery) + } +} + +func TestCollectorDuplicates(t *testing.T) { + c := newCollector(3, task{name: "Noop"}) + for _, id := range []int64{0, 1, 1, 2} { + c.handle(payload{ID: id}) + } + + if err := c.wait(time.Second); err != nil { + t.Fatal(err) + } + + if got := c.dups(); got != 1 { + t.Fatalf("dups = %d, want 1", got) + } +} + +func TestCollectorTimeout(t *testing.T) { + c := newCollector(3, task{name: "Noop"}) + c.handle(payload{ID: 0}) + + err := c.wait(50 * time.Millisecond) + if err == nil || !strings.Contains(err.Error(), "1/3") { + t.Fatalf("err = %v, want one containing 1/3", err) + } +} diff --git a/redis/varmq.go b/redis/varmq.go new file mode 100644 index 0000000..50223d0 --- /dev/null +++ b/redis/varmq.go @@ -0,0 +1,55 @@ +package durable + +import ( + "errors" + + "github.com/goptics/redisq" + "github.com/goptics/varmq" +) + +const varmqKey = "bench" + +// varmqQueue binds a worker to a redisq-backed persistent queue. Extra worker +// options (like WithAutoRun) go after the concurrency. close releases the +// queue and its Redis client, and never waits on the worker. +func varmqQueue(url string, workers int, h handler, opts ...any) (varmq.PersistentQueue[payload], varmq.Worker, func()) { + qs := redisq.New(withPoolSize(url, poolSize(workers))) + rq := qs.NewQueue(varmqKey) + + w := varmq.NewWorker(func(j varmq.Job[payload]) { h(j.Data()) }, append([]any{workers}, opts...)...) + pq := w.WithPersistentQueue(rq) + + return pq, pq.Worker(), func() { + _ = rq.Close() + _ = qs.Close() + } +} + +func varmqEnqueue(pq varmq.PersistentQueue[payload]) enqueueFunc { + return func(p payload) error { + if !pq.Add(p) { + return errors.New("varmq: persistent queue refused the job") + } + + return nil + } +} + +// varmqProducer only enqueues. The worker is built with WithAutoRun(false), so +// nothing is consumed. +func varmqProducer(url string) (enqueueFunc, func()) { + pq, _, closeQueue := varmqQueue(url, 1, nil, varmq.WithAutoRun(false)) + + return varmqEnqueue(pq), closeQueue +} + +// varmqConsumer returns the bound queue's Add as enqueue: a persistent queue +// wakes its worker in process, so the producer must be this instance. +func varmqConsumer(url string, workers int, h handler) (enqueueFunc, func()) { + pq, w, closeQueue := varmqQueue(url, workers, h) + + return varmqEnqueue(pq), func() { + _ = w.WaitAndStop() // lets the last acks finish before the client closes + closeQueue() + } +} diff --git a/redis/varmq_distributed.go b/redis/varmq_distributed.go new file mode 100644 index 0000000..9ca997d --- /dev/null +++ b/redis/varmq_distributed.go @@ -0,0 +1,47 @@ +package durable + +import ( + "errors" + + "github.com/goptics/redisq" + "github.com/goptics/varmq" +) + +// varmqDistributedProducer only enqueues: a redisq distributed queue wrapped by +// varmq.NewDistributedQueue, with no worker bound. Each Add is one Lua script +// that RPUSHes and then wakes up to one idle consumer per waiting item, each on +// its own wake channel (redisq v1.5.0, listPushWake in redisq/distributed.go). +func varmqDistributedProducer(url string) (enqueueFunc, func()) { + qs := redisq.New(withPoolSize(url, poolSize(0))) + rq := qs.NewDistributedQueue(varmqKey) + dq := varmq.NewDistributedQueue[payload](rq) + + return func(p payload) error { + if !dq.Add(p) { + return errors.New("varmq: distributed queue refused the job") + } + + return nil + }, func() { + _ = rq.Close() // stops the pub/sub subscription + _ = qs.Close() + } +} + +// varmqDistributedConsumer binds a worker to the distributed queue and returns +// no enqueue: the producer is separate, and a wake on this instance's own +// pub/sub channel (:wake:), or redisq's 1 s nudge, is what wakes it. +// WaitAndStop lets the last acks finish before the client closes. +func varmqDistributedConsumer(url string, workers int, h handler) (enqueueFunc, func()) { + qs := redisq.New(withPoolSize(url, poolSize(workers))) + rq := qs.NewDistributedQueue(varmqKey) + + w := varmq.NewWorker(func(j varmq.Job[payload]) { h(j.Data()) }, workers) + w.WithDistributedQueue(rq) + + return nil, func() { + _ = w.WaitAndStop() + _ = rq.Close() + _ = qs.Close() + } +} diff --git a/sqlite/README.md b/sqlite/README.md new file mode 100644 index 0000000..129c8fe --- /dev/null +++ b/sqlite/README.md @@ -0,0 +1,83 @@ +# SQLite queue benchmarks + +End-to-end benchmarks for [sqliteq](https://github.com/goptics/sqliteq) v0.3.0, +VarMQ's SQLite storage adapter. Jobs go in through a VarMQ persistent queue, a +worker runs them, and the benchmark waits until the queue is empty. Unlike +[redis/](../redis/README.md) there are no rival libraries, so the results show +how sqliteq behaves under different layouts and checkpoint sizes. + +It lives in its own Go module so sqliteq's cgo SQLite driver stays out of the +other modules. It needs a C compiler and nothing else. + +## Run + +```sh +task sqlite:test # vet and compile +task sqlite:bench # every scenario once +task sqlite:txt # full run into bench/sqlite.txt +``` + +- `SQLITEQ_BENCH_DIR` is where the databases are created (default + `/varmq-bench-sqlite`). **Use a real disk.** Durable writes + pay for fsync, and `/tmp` is often a tmpfs where that cost vanishes. Each + iteration gets a fresh subdirectory and removes it afterwards. + +## Scenarios + +Every job is an `int`; the worker handler does nothing and runs 16 jobs at a +time (`WithConcurrency(16)`). + +| Name | Queues | Producers per queue | Jobs | Timed | +|------|-------:|--------------------:|-----:|-------| +| `Mixed1Q` | 1 | 4 | 20,000 | first `Add` to `Wait`, producing and consuming at once | +| `Drain1Q` | 1 | 4 | 20,000 | worker paused, everything added, then `Resume` to `Wait` | +| `DrainPrio` | 1 | 4 | 10,000 | as `Drain1Q` on a priority queue, priority `i % 4` | +| `Mixed10Q` | 10 | 1 | 20,000 | as `Mixed1Q`, one worker per queue | + +## Names and metrics + +Row names are `BenchmarkSQLite///ckpt`, ten rows in all. + +- Layout `Folder` is one database file per queue; `SingleFile` is every queue + in one file. Only `Mixed10Q` runs both, since with one queue they are the + same thing; the others run `SingleFile`. +- `ckpt` is the WAL checkpoint size in pages, 1000 or 10000. +- `jobs/s` is the job count divided by the timed part. Setup, teardown and the + checks below are not timed. +- `walMB` is the largest size, in MB (10^6 bytes), that any one `-wal` file of + the run reached. A goroutine reads the size of every `-wal` file in the run's + directory every 50 ms, from the store's opening until just before it closes, + so a drain row includes its untimed adding phase. With several iterations the + largest peak is reported. A peak that lasts under 50 ms can be missed. + +After `Wait`, a run fails if any `Add` returned false, if the handler ran a +different number of times than jobs were added, or if any row is still in a +queue table (counted with `database/sql`, not through sqliteq). A lost or stuck +job therefore fails the benchmark instead of making it look fast. + +## Dataset on the site + +`bench/sqlite.txt` becomes the `sqlite-persistent` dataset: groups are the +scenarios, the y axis is the layout and the x axis is the checkpoint size. +`walMB` is marked lower-is-better. + +## Results + +`bench/sqlite.txt` is one run from 2026-10-24: varmq 415ad73 (unreleased, +through the `replace` directive in `go.mod`), sqliteq v0.3.0, `-benchtime=2x`, +default CPUs, ext4 over NVMe. jobs/s, higher is better; `walMB` is the peak +WAL size. + +| Scenario | Layout | ckpt1000 | ckpt10000 | walMB 1000 / 10000 | +|----------|--------|---------:|----------:|-------------------:| +| `Mixed1Q` | SingleFile | 6,351 | 10,236 | 4.2 / 41.2 | +| `Drain1Q` | SingleFile | 14,020 | 19,169 | 4.1 / 41.2 | +| `DrainPrio` | SingleFile | 12,320 | 24,036 | 4.1 / 41.2 | +| `Mixed10Q` | Folder | 21,058 | 69,482 | 4.1 / 39.8 | +| `Mixed10Q` | SingleFile | 5,255 | 11,578 | 4.2 / 41.3 | + +A 10,000-page checkpoint runs 1.4 to 3.3x faster than the 1,000-page default +and holds a WAL about ten times larger (41 MB against 4 MB at this payload). +Ten queues in separate files run 4 to 6x faster than the same ten in one +file, which fits SQLite allowing one writer per database file. The machine +and disk change these numbers a lot, so compare runs on the same machine only. diff --git a/sqlite/Taskfile.yml b/sqlite/Taskfile.yml new file mode 100644 index 0000000..1b1df72 --- /dev/null +++ b/sqlite/Taskfile.yml @@ -0,0 +1,16 @@ +version: "3" +tasks: + test: + desc: Vet and compile (needs a C compiler) + cmds: + - go vet ./... + - go test ./... + bench: + desc: Every scenario once + cmds: + - go test -run xxx -bench . -benchtime=1x -timeout 60m + txt: + desc: Full run into bench/sqlite.txt (real disk; SQLITEQ_BENCH_DIR picks it) + cmds: + - mkdir -p bench + - set -o pipefail; go test -run xxx -bench . -benchtime=2x -timeout 60m | tee bench/sqlite.txt diff --git a/sqlite/bench/sqlite.txt b/sqlite/bench/sqlite.txt new file mode 100644 index 0000000..8f96b01 --- /dev/null +++ b/sqlite/bench/sqlite.txt @@ -0,0 +1,16 @@ +goos: linux +goarch: amd64 +pkg: github.com/goptics/benchmarks/sqlite +cpu: 13th Gen Intel(R) Core(TM) i7-13700 +BenchmarkSQLite/Mixed1Q/SingleFile/ckpt1000-24 2 3149068829 ns/op 6351 jobs/s 4.153 walMB +BenchmarkSQLite/Mixed1Q/SingleFile/ckpt10000-24 2 1953916054 ns/op 10236 jobs/s 41.22 walMB +BenchmarkSQLite/Drain1Q/SingleFile/ckpt1000-24 2 1426568010 ns/op 14020 jobs/s 4.145 walMB +BenchmarkSQLite/Drain1Q/SingleFile/ckpt10000-24 2 1043378285 ns/op 19169 jobs/s 41.22 walMB +BenchmarkSQLite/DrainPrio/SingleFile/ckpt1000-24 2 811688704 ns/op 12320 jobs/s 4.149 walMB +BenchmarkSQLite/DrainPrio/SingleFile/ckpt10000-24 2 416049300 ns/op 24036 jobs/s 41.22 walMB +BenchmarkSQLite/Mixed10Q/Folder/ckpt1000-24 2 949778238 ns/op 21058 jobs/s 4.132 walMB +BenchmarkSQLite/Mixed10Q/Folder/ckpt10000-24 2 287843161 ns/op 69482 jobs/s 39.75 walMB +BenchmarkSQLite/Mixed10Q/SingleFile/ckpt1000-24 2 3805894852 ns/op 5255 jobs/s 4.244 walMB +BenchmarkSQLite/Mixed10Q/SingleFile/ckpt10000-24 2 1727460905 ns/op 11578 jobs/s 41.29 walMB +PASS +ok github.com/goptics/benchmarks/sqlite 59.913s diff --git a/sqlite/benchmark_test.go b/sqlite/benchmark_test.go new file mode 100644 index 0000000..34df535 --- /dev/null +++ b/sqlite/benchmark_test.go @@ -0,0 +1,27 @@ +package sqlite + +import ( + "fmt" + "testing" +) + +// checkpoints are the WAL checkpoint page counts every row runs at. +var checkpoints = []int{1000, 10000} + +// BenchmarkSQLite enqueues and drains jobs through a varmq worker bound to a +// sqliteq queue. Names are //ckpt. +func BenchmarkSQLite(b *testing.B) { + for _, sc := range scenarios { + b.Run(sc.name, func(b *testing.B) { + for _, l := range sc.layouts { + b.Run(l.String(), func(b *testing.B) { + for _, ckpt := range checkpoints { + b.Run(fmt.Sprintf("ckpt%d", ckpt), func(b *testing.B) { + runScenario(b, sc, l, ckpt) + }) + } + }) + } + }) + } +} diff --git a/sqlite/go.mod b/sqlite/go.mod new file mode 100644 index 0000000..744b5e3 --- /dev/null +++ b/sqlite/go.mod @@ -0,0 +1,11 @@ +module github.com/goptics/benchmarks/sqlite + +go 1.26.0 + +require ( + github.com/goptics/sqliteq v0.3.0 + github.com/goptics/varmq v1.9.0 + github.com/mattn/go-sqlite3 v1.14.28 +) + +replace github.com/goptics/varmq => ../../varmq diff --git a/sqlite/go.sum b/sqlite/go.sum new file mode 100644 index 0000000..19ef01b --- /dev/null +++ b/sqlite/go.sum @@ -0,0 +1,12 @@ +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/goptics/sqliteq v0.3.0 h1:5Jff3AqiEt2Em41QK83tBalqNCF64vrBJY1JdWRkfog= +github.com/goptics/sqliteq v0.3.0/go.mod h1:9FFuDJnO3iC5ToSBDxJGCeds5VORAYgX0xBEZznqgV4= +github.com/mattn/go-sqlite3 v1.14.28 h1:ThEiQrnbtumT+QMknw63Befp/ce/nUPgBPMlRFEum7A= +github.com/mattn/go-sqlite3 v1.14.28/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sqlite/harness_test.go b/sqlite/harness_test.go new file mode 100644 index 0000000..cba19da --- /dev/null +++ b/sqlite/harness_test.go @@ -0,0 +1,362 @@ +package sqlite + +import ( + "database/sql" + "fmt" + "os" + "path/filepath" + "sync" + "sync/atomic" + "testing" + "time" + + "github.com/goptics/sqliteq" + "github.com/goptics/varmq" + _ "github.com/mattn/go-sqlite3" +) + +// scenario is one row of the benchmark matrix. +type scenario struct { + name string + queues int + producers int // per queue + total int // jobs over all queues + drain bool // pause the worker, add everything, then time the drain + priority bool + layouts []layout +} + +func (sc scenario) perProducer() int { return sc.total / sc.queues / sc.producers } + +var scenarios = []scenario{ + {name: "Mixed1Q", queues: 1, producers: 4, total: 20000, layouts: []layout{singleFile}}, + {name: "Drain1Q", queues: 1, producers: 4, total: 20000, drain: true, layouts: []layout{singleFile}}, + {name: "DrainPrio", queues: 1, producers: 4, total: 10000, drain: true, priority: true, layouts: []layout{singleFile}}, + {name: "Mixed10Q", queues: 10, producers: 1, total: 20000, layouts: []layout{folder, singleFile}}, +} + +// benchRoot is where the benchmark databases live. They must be on a real disk: +// on a tmpfs /tmp the fsync cost this benchmark measures would vanish. +func benchRoot(tb testing.TB) string { + tb.Helper() + + if d := os.Getenv("SQLITEQ_BENCH_DIR"); d != "" { + return d + } + + cache, err := os.UserCacheDir() + if err != nil { + tb.Fatalf("no SQLITEQ_BENCH_DIR and no user cache dir: %v", err) + } + + return filepath.Join(cache, "varmq-bench-sqlite") +} + +// freshDir makes an empty directory under benchRoot and removes it on cleanup. +func freshDir(tb testing.TB) string { + tb.Helper() + + root := benchRoot(tb) + if err := os.MkdirAll(root, 0o755); err != nil { + tb.Fatalf("mkdir %s: %v", root, err) + } + + dir, err := os.MkdirTemp(root, "run-") + if err != nil { + tb.Fatalf("mkdir temp: %v", err) + } + + tb.Cleanup(func() { _ = os.RemoveAll(dir) }) + + return dir +} + +// waitDeadline bounds how long one iteration waits for its workers to drain, +// so a stuck job fails its row instead of hanging the whole run. +const waitDeadline = 5 * time.Minute + +// bound is one queue with its worker. +type bound struct { + worker varmq.Worker + add func(i int) bool // enqueues job number i +} + +func bind(tb testing.TB, qs sqliteq.Queues, sc scenario, name string, ran *atomic.Int64) bound { + tb.Helper() + + w := varmq.NewWorker(func(varmq.Job[int]) { ran.Add(1) }, varmq.WithConcurrency(16)) + + if sc.priority { + q, err := qs.NewPriorityQueue(name) + if err != nil { + tb.Fatal(err) + } + + pq := w.WithPersistentPriorityQueue(q) + + return bound{worker: pq.Worker(), add: func(i int) bool { return pq.Add(i, i%4) }} + } + + q, err := qs.NewQueue(name) + if err != nil { + tb.Fatal(err) + } + + pq := w.WithPersistentQueue(q) + + return bound{worker: pq.Worker(), add: func(i int) bool { return pq.Add(i) }} +} + +// runScenario runs sc b.N times, each on a fresh database, and reports jobs/s +// over the timed part only: setup, teardown and the leftover check are not +// timed. Mixed times the first Add to Wait. Drain times Resume to Wait. It +// also reports walMB, the largest size any one -wal file reached in any +// iteration, untimed parts included. +func runScenario(b *testing.B, sc scenario, l layout, ckpt int) { + b.Helper() + + var walPeak int64 + + for range b.N { + b.StopTimer() + walPeak = max(walPeak, runOnce(b, sc, l, ckpt)) + } + + if sec := b.Elapsed().Seconds(); sec > 0 { + b.ReportMetric(float64(sc.total*b.N)/sec, "jobs/s") + } + + b.ReportMetric(float64(walPeak)/1e6, "walMB") +} + +// walSampleEvery is how often sampleWAL reads the -wal file sizes. +const walSampleEvery = 50 * time.Millisecond + +// sampleWAL reads the size of every -wal file in dir every walSampleEvery, on +// its own goroutine, until the returned stop is called. stop takes one last +// sample and returns the largest size any one file reached; it may be called +// more than once. +func sampleWAL(dir string) (stop func() int64) { + var peak int64 // owned by the goroutine until done closes + + sample := func() { + files, _ := filepath.Glob(filepath.Join(dir, "*-wal")) + for _, f := range files { + if fi, err := os.Stat(f); err == nil { + peak = max(peak, fi.Size()) + } + } + } + + quit, done := make(chan struct{}), make(chan struct{}) + + go func() { + defer close(done) + + t := time.NewTicker(walSampleEvery) + defer t.Stop() + + for { + select { + case <-t.C: + sample() + case <-quit: + sample() + + return + } + } + }() + + var once sync.Once + + return func() int64 { + once.Do(func() { close(quit) }) + <-done + + return peak + } +} + +// runOnce runs one iteration and returns its WAL peak in bytes. +func runOnce(b *testing.B, sc scenario, l layout, ckpt int) int64 { + b.Helper() + + dir := freshDir(b) + + path := dir + if l == singleFile { + path = filepath.Join(dir, "bench.db") + } + + qs := openStore(b, path, l, ckpt) + + stopWAL := sampleWAL(dir) + defer stopWAL() // a failed iteration still stops the sampler + + var ran atomic.Int64 // handler runs over all queues + + bounds := make([]bound, sc.queues) + for i := range bounds { + bounds[i] = bind(b, qs, sc, fmt.Sprintf("q%d", i), &ran) + + if sc.drain { + if err := bounds[i].worker.Pause(); err != nil { + b.Fatalf("pause: %v", err) + } + } + } + + var ( + wg sync.WaitGroup + failed atomic.Int64 + ) + + produce := func() { + for _, bd := range bounds { + for p := range sc.producers { + wg.Go(func() { + for j := range sc.perProducer() { + if !bd.add(p*sc.perProducer() + j) { + failed.Add(1) + } + } + }) + } + } + + wg.Wait() + } + + if sc.drain { + produce() + b.StartTimer() + + for _, bd := range bounds { + if err := bd.worker.Resume(); err != nil { + b.Fatalf("resume: %v", err) + } + } + } else { + b.StartTimer() + produce() + } + + waited := make(chan struct{}) + + go func() { + defer close(waited) + + for _, bd := range bounds { + bd.worker.Wait() + } + }() + + select { + case <-waited: + case <-time.After(waitDeadline): + b.StopTimer() + b.Fatalf("%s: workers still busy %s after the last Add: a job is stuck", sc.name, waitDeadline) + } + + b.StopTimer() + + if n := ran.Load(); n != int64(sc.total) { + b.Fatalf("%s: handler ran %d times, want %d: a job was lost or run twice", sc.name, n, sc.total) + } + + if n := failed.Load(); n > 0 { + b.Fatalf("%d Add calls returned false", n) + } + + if left, err := rowsLeft(path, l, sc.queues); err != nil { + b.Fatalf("count leftover rows: %v", err) + } else if left > 0 { + b.Fatalf("%d rows left in the queue tables after Wait", left) + } + + for _, bd := range bounds { + if err := bd.worker.WaitAndStop(); err != nil { + b.Fatalf("stop: %v", err) + } + } + + // Closing checkpoints and removes the WAL, so the sampling stops first + walPeak := stopWAL() + + if err := qs.Close(); err != nil { + b.Fatalf("close store: %v", err) + } + + return walPeak +} + +// rowsLeft counts the rows in every table of the store's database files, read +// with database/sql directly. It fails when it finds fewer than queues tables, +// so a check that looked at nothing cannot pass. +func rowsLeft(path string, l layout, queues int) (rows int, err error) { + files := []string{path} + + if l == folder { + if files, err = filepath.Glob(filepath.Join(path, "*.db")); err != nil { + return 0, err + } + } + + tables := 0 + + for _, f := range files { + db, err := sql.Open("sqlite3", f) + if err != nil { + return 0, err + } + + names, err := tableNames(db) + if err != nil { + db.Close() + + return 0, err + } + + for _, t := range names { + var n int + if err := db.QueryRow(`SELECT COUNT(*) FROM "` + t + `"`).Scan(&n); err != nil { + db.Close() + + return 0, err + } + + rows += n + tables++ + } + + db.Close() + } + + if tables < queues { + return 0, fmt.Errorf("found %d queue tables, want at least %d", tables, queues) + } + + return rows, nil +} + +func tableNames(db *sql.DB) ([]string, error) { + r, err := db.Query(`SELECT name FROM sqlite_master WHERE type = 'table' AND name NOT LIKE 'sqlite_%'`) + if err != nil { + return nil, err + } + defer r.Close() + + var names []string + + for r.Next() { + var n string + if err := r.Scan(&n); err != nil { + return nil, err + } + + names = append(names, n) + } + + return names, r.Err() +} diff --git a/sqlite/store.go b/sqlite/store.go new file mode 100644 index 0000000..842a93b --- /dev/null +++ b/sqlite/store.go @@ -0,0 +1,45 @@ +// Package sqlite benchmarks sqliteq, the SQLite storage adapter, end to end +// through a varmq worker. +package sqlite + +import ( + "testing" + + "github.com/goptics/sqliteq" +) + +// layout is how queues map onto database files. +type layout int + +const ( + // folder is one database file per queue, all in the directory path. + folder layout = iota + // singleFile is every queue in the one database file path. + singleFile +) + +func (l layout) String() string { + if l == folder { + return "Folder" + } + + return "SingleFile" +} + +// openStore opens one sqliteq database set at path with the given WAL +// checkpoint page count. +func openStore(tb testing.TB, path string, l layout, ckpt int) sqliteq.Queues { + tb.Helper() + + opts := []sqliteq.StoreOption{sqliteq.WithCheckpointPages(ckpt)} + if l == singleFile { + opts = append(opts, sqliteq.WithSingleFile()) + } + + qs, err := sqliteq.New(path, opts...) + if err != nil { + tb.Fatalf("sqliteq.New(%s): %v", path, err) + } + + return qs +} diff --git a/worker/worker.js b/worker/worker.js new file mode 100644 index 0000000..41fc1bc --- /dev/null +++ b/worker/worker.js @@ -0,0 +1,18 @@ +const ID = /^\/dataset\/([a-z0-9-]+)$/; + +export default { + async fetch(request, env) { + const url = new URL(request.url); + let path; + if (url.pathname === "/dataset") path = "/data/_catalog.json"; + else if (ID.test(url.pathname)) path = `/data/${ID.exec(url.pathname)[1]}.json`; + else if (url.pathname.startsWith("/dataset/")) return new Response("not found", { status: 404 }); + else return env.ASSETS.fetch(request); // index.html and the SPA fallback + + const res = await env.ASSETS.fetch(new Request(new URL(path, url), request)); + // A missing asset comes back as index.html (SPA fallback); a revalidation comes back 304. + const ct = res.headers.get("content-type") || ""; + if (res.status !== 304 && !ct.includes("json")) return new Response("not found", { status: 404 }); + return res; // etag, content-type, 304s come from Static Assets + }, +}; diff --git a/worker/wrangler.jsonc b/worker/wrangler.jsonc new file mode 100644 index 0000000..1361436 --- /dev/null +++ b/worker/wrangler.jsonc @@ -0,0 +1,12 @@ +{ + "name": "benchmarks", + "main": "worker.js", + "compatibility_date": "2026-10-01", + "assets": { + "directory": "./public", + "binding": "ASSETS", + "not_found_handling": "single-page-application", + "run_worker_first": ["/dataset", "/dataset/*"] + }, + "routes": [{ "pattern": "benchmarks.goptics.org", "custom_domain": true }] +}