Makefile: disable postgres fsync in the test container
This change turns off fsync on the postgres container used for tests. This reduces migration time significantly when initializing new satellite databases. The change also includes a new benchmark for satellite initialization in testplanet. $ benchstat old.txt new.txt name old time/op new time/op delta Run_Satellite/Postgres-16 1.36s ± 0% 0.08s ± 0% ~ (p=1.000 n=1+1) Change-Id: Ic954767133864770cf652b0dfdcd6b109a167b5f
This commit is contained in:
parent
4fdea51d5c
commit
b2b8efff7d
@ -5,6 +5,7 @@ version: "3.4"
|
|||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
hostname: postgres
|
hostname: postgres
|
||||||
|
command: -c fsync=off
|
||||||
image: postgres
|
image: postgres
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
|
@ -25,6 +25,10 @@ func TestRun(t *testing.T) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func BenchmarkRun_Satellite(b *testing.B) {
|
||||||
|
benchmarkRunConfig(b, testplanet.Config{SatelliteCount: 1})
|
||||||
|
}
|
||||||
|
|
||||||
func BenchmarkRun_StorageNode(b *testing.B) {
|
func BenchmarkRun_StorageNode(b *testing.B) {
|
||||||
benchmarkRunConfig(b, testplanet.Config{StorageNodeCount: 4})
|
benchmarkRunConfig(b, testplanet.Config{StorageNodeCount: 4})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user