Skip to content

fix(sql): Correct storage partition rebuild functions - #190

Merged
devsjc merged 1 commit into
mainfrom
devsjc/fix-migration-12
Aug 12, 2026
Merged

fix(sql): Correct storage partition rebuild functions#190
devsjc merged 1 commit into
mainfrom
devsjc/fix-migration-12

Conversation

@devsjc

@devsjc devsjc commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Slightly modifies the functions used to rebuild the partitions.

@github-actions

Copy link
Copy Markdown

Benchmark Results

Benchmark results
?   	github.com/openclimatefix/data-platform/cmd	[no test files]
?   	github.com/openclimatefix/data-platform/internal/gen/ocf/dp	[no test files]
?   	github.com/openclimatefix/data-platform/internal/interceptors	[no test files]
PASS
ok  	github.com/openclimatefix/data-platform/internal/server/dummy	0.005s
{"level":"debug","time":"2026-08-12T08:57:24Z","message":"Completed migrations"}
goos: linux
goarch: amd64
pkg: github.com/openclimatefix/data-platform/internal/server/postgres
cpu: AMD EPYC 7763 64-Core Processor                
BenchmarkPostgresClient/small/GetForecastAsTimeseries-4         	     115	   9523277 ns/op
BenchmarkPostgresClient/small/GetForecastAtTimestamp-4          	     296	   3875763 ns/op
BenchmarkPostgresClient/small/GetObservationsAsTimeseries-4     	     890	   1302198 ns/op
BenchmarkPostgresClient/small/CreateForecast-4                  	     106	  10928198 ns/op
BenchmarkPostgresClient/small/StreamForecastData-4              	      25	  45238556 ns/op
PASS
ok  	github.com/openclimatefix/data-platform/internal/server/postgres	66.586s
?   	github.com/openclimatefix/data-platform/internal/server/postgres/gen	[no test files]
Benchmark vs base branch
goos: linux
goarch: amd64
pkg: github.com/openclimatefix/data-platform/internal/server/postgres
cpu: AMD EPYC 7763 64-Core Processor                
                                                   │ bench-main.txt │  bench-devsjc-fix-migration-12.txt   │
                                                   │     sec/op     │    sec/op     vs base                │
PostgresClient/small/GetForecastAsTimeseries-4         8.924m ± ∞ ¹   9.523m ± ∞ ¹       ~ (p=1.000 n=1) ²
PostgresClient/small/GetForecastAtTimestamp-4          3.970m ± ∞ ¹   3.876m ± ∞ ¹       ~ (p=1.000 n=1) ²
PostgresClient/small/GetObservationsAsTimeseries-4     1.243m ± ∞ ¹   1.302m ± ∞ ¹       ~ (p=1.000 n=1) ²
PostgresClient/small/CreateForecast-4                  12.76m ± ∞ ¹   10.93m ± ∞ ¹       ~ (p=1.000 n=1) ²
PostgresClient/small/StreamForecastData-4              45.73m ± ∞ ¹   45.24m ± ∞ ¹       ~ (p=1.000 n=1) ²
geomean                                                7.620m         7.502m        -1.55%
¹ need >= 6 samples for confidence interval at level 0.95
² need >= 4 samples to detect a difference at alpha level 0.05

@devsjc devsjc changed the title chore(sql): Correct storage partition rebuild functions fix(sql): Correct storage partition rebuild functions Aug 12, 2026
@devsjc
devsjc merged commit 01c21ac into main Aug 12, 2026
4 checks passed
@devsjc
devsjc deleted the devsjc/fix-migration-12 branch August 12, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant