cortex
cortex copied to clipboard
Slow unit tests
Some of our tests are slow. Here is list of packages with tests that run above 5 seconds (from https://github.com/cortexproject/cortex/runs/2054589567 run).
227.510s github.com/cortexproject/cortex/pkg/ring
213.005s github.com/cortexproject/cortex/pkg/querier
60.907s github.com/cortexproject/cortex/pkg/ingester
60.674s github.com/cortexproject/cortex/pkg/storegateway
42.779s github.com/cortexproject/cortex/pkg/chunk
39.780s github.com/cortexproject/cortex/pkg/chunk/encoding
39.727s github.com/cortexproject/cortex/pkg/ring/kv/memberlist
31.959s github.com/cortexproject/cortex/pkg/distributor
30.898s github.com/cortexproject/cortex/pkg/alertmanager
25.667s github.com/cortexproject/cortex/tools/blocksconvert/builder
23.770s github.com/cortexproject/cortex/pkg/chunk/purger
23.678s github.com/cortexproject/cortex/pkg/compactor
22.412s github.com/cortexproject/cortex/pkg/util
12.049s github.com/cortexproject/cortex/pkg/util/services
11.433s github.com/cortexproject/cortex/pkg/util/tls/test
8.013s github.com/cortexproject/cortex/pkg/storage/tsdb/bucketindex
7.349s github.com/cortexproject/cortex/pkg/chunk/storage
If we can optimize some of these, that would be great.
This issue has been automatically marked as stale because it has not had any activity in the past 60 days. It will be closed in 15 days if no further activity occurs. Thank you for your contributions.
Still valid, help wanted!
@bboreham @pracucci @yeya24 I've written some simple unit tests before so I can give this a try :) Please correct me if I sound vague, would adding t.parallel() to the tests, help in this case?
yes @moki1202 , that would help see for example https://github.com/cortexproject/cortex/pull/5076
I can take this issue then :)