diff options
author | James Fargher <jfargher@gitlab.com> | 2023-03-15 01:15:24 +0300 |
---|---|---|
committer | James Fargher <jfargher@gitlab.com> | 2023-03-16 23:47:38 +0300 |
commit | 61f6d11a9f675127a8a98b15b4d96d74df0f258b (patch) | |
tree | 501eb3889f7142bfd50879cfe361336b83424fff | |
parent | 857860476afcd862a11f55c5da81d33e44e9e67b (diff) |
docs: Update benchmark commands in comments
These comments will otherwise become out-of-date every time we update
the major version.
-rw-r--r-- | internal/praefect/datastore/glsql/doc.go | 2 | ||||
-rw-r--r-- | internal/praefect/datastore/queue_bm_test.go | 4 | ||||
-rw-r--r-- | internal/praefect/datastore/repository_store_bm_test.go | 5 |
3 files changed, 1 insertions, 10 deletions
diff --git a/internal/praefect/datastore/glsql/doc.go b/internal/praefect/datastore/glsql/doc.go index 3e68b4bf2..655995fd6 100644 --- a/internal/praefect/datastore/glsql/doc.go +++ b/internal/praefect/datastore/glsql/doc.go @@ -23,7 +23,7 @@ // go test \ // -v \ // -count=1 \ -// gitlab.com/gitlab-org/gitaly/v15/internal/praefect/datastore/glsql \ +// ./internal/praefect/datastore/glsql \ // -run=^TestOpenDB$ // // Once it is finished successfully you can be sure other tests would be able to diff --git a/internal/praefect/datastore/queue_bm_test.go b/internal/praefect/datastore/queue_bm_test.go index 7c8bee2fc..de7f60f29 100644 --- a/internal/praefect/datastore/queue_bm_test.go +++ b/internal/praefect/datastore/queue_bm_test.go @@ -11,22 +11,18 @@ import ( ) func BenchmarkPostgresReplicationEventQueue_Acknowledge(b *testing.B) { - // go test -tags=postgres -test.run=~ -test.bench=BenchmarkPostgresReplicationEventQueue_Acknowledge/small -benchtime=1000x gitlab.com/gitlab-org/gitaly/v15/internal/praefect/datastore b.Run("small", func(b *testing.B) { benchmarkPostgresReplicationEventQueueAcknowledge(b, map[JobState]int{JobStateReady: 10, JobStateInProgress: 10, JobStateFailed: 10}) }) - // go test -tags=postgres -test.run=~ -test.bench=BenchmarkPostgresReplicationEventQueue_Acknowledge/medium -benchtime=100x gitlab.com/gitlab-org/gitaly/v15/internal/praefect/datastore b.Run("medium", func(b *testing.B) { benchmarkPostgresReplicationEventQueueAcknowledge(b, map[JobState]int{JobStateReady: 1_000, JobStateInProgress: 100, JobStateFailed: 100}) }) - // go test -tags=postgres -test.run=~ -test.bench=BenchmarkPostgresReplicationEventQueue_Acknowledge/big -benchtime=10x gitlab.com/gitlab-org/gitaly/v15/internal/praefect/datastore b.Run("big", func(b *testing.B) { benchmarkPostgresReplicationEventQueueAcknowledge(b, map[JobState]int{JobStateReady: 100_000, JobStateInProgress: 100, JobStateFailed: 100}) }) - // go test -tags=postgres -test.run=~ -test.bench=BenchmarkPostgresReplicationEventQueue_Acknowledge/huge -benchtime=1x gitlab.com/gitlab-org/gitaly/v15/internal/praefect/datastore b.Run("huge", func(b *testing.B) { benchmarkPostgresReplicationEventQueueAcknowledge(b, map[JobState]int{JobStateReady: 1_000_000, JobStateInProgress: 100, JobStateFailed: 100}) }) diff --git a/internal/praefect/datastore/repository_store_bm_test.go b/internal/praefect/datastore/repository_store_bm_test.go index 3f982e417..cf595e06c 100644 --- a/internal/praefect/datastore/repository_store_bm_test.go +++ b/internal/praefect/datastore/repository_store_bm_test.go @@ -13,27 +13,22 @@ import ( // The test setup takes a lot of time, so it is better to run each sub-benchmark separately with limit on number of repeats. func BenchmarkPostgresRepositoryStore_GetConsistentStorages(b *testing.B) { - // go test -tags=postgres -test.bench=BenchmarkPostgresRepositoryStore_GetConsistentStorages/extra-small -benchtime=5000x gitlab.com/gitlab-org/gitaly/v15/internal/praefect/datastore b.Run("extra-small", func(b *testing.B) { benchmarkGetConsistentStorages(b, 3, 1000) }) - // go test -tags=postgres -test.bench=BenchmarkPostgresRepositoryStore_GetConsistentStorages/small -benchtime=1000x gitlab.com/gitlab-org/gitaly/v15/internal/praefect/datastore b.Run("small", func(b *testing.B) { benchmarkGetConsistentStorages(b, 3, 10_000) }) - // go test -tags=postgres -test.bench=BenchmarkPostgresRepositoryStore_GetConsistentStorages/medium -benchtime=50x gitlab.com/gitlab-org/gitaly/v15/internal/praefect/datastore b.Run("medium", func(b *testing.B) { benchmarkGetConsistentStorages(b, 3, 100_000) }) - // go test -tags=postgres -test.bench=BenchmarkPostgresRepositoryStore_GetConsistentStorages/large -benchtime=10x gitlab.com/gitlab-org/gitaly/v15/internal/praefect/datastore b.Run("large", func(b *testing.B) { benchmarkGetConsistentStorages(b, 3, 1_000_000) }) - // go test -tags=postgres -test.bench=BenchmarkPostgresRepositoryStore_GetConsistentStorages/huge -benchtime=1x gitlab.com/gitlab-org/gitaly/v15/internal/praefect/datastore b.Run("huge", func(b *testing.B) { benchmarkGetConsistentStorages(b, 6, 1_000_000) }) |