Skip to content

Conversation

@peterdudfield
Copy link
Contributor

@peterdudfield peterdudfield commented Nov 7, 2025

Small update for sql

  • make sure gsp are labelled with 2

  • adde refresh materialized view

  • Have you followed the Open Climate Fix Contribution Guidelines?

  • Have you referenced the Issue this PR addresses?

  • Have you checked to ensure there aren't other open Pull Requests for the same change?

  • Have you added a summary of the changes?

  • Have you written new tests for your changes?.

  • Have you successfully run make lint with your changes locally?

  • Have you successfully run make gen with your changes locally?

  • Have you successfully run make test with your changes locally?

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

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":"2025-11-07T14:24:45Z","message":"Running migrations"}
goos: linux
goarch: amd64
pkg: github.com/openclimatefix/data-platform/internal/server/postgres
cpu: AMD EPYC 7763 64-Core Processor                
BenchmarkPostgresClient/6144000/GetForecastAsTimeseries-4         	     192	   5852633 ns/op
BenchmarkPostgresClient/6144000/GetForecastAtTimestamp-4          	      46	  24001374 ns/op
BenchmarkPostgresClient/6144000/GetObservationsAsTimeseries-4     	     925	   1235705 ns/op
BenchmarkPostgresClient/6144000/CreateForecast-4                  	     344	   3233857 ns/op
PASS
ok  	github.com/openclimatefix/data-platform/internal/server/postgres	114.197s
?   	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-update-sql-uk-data.txt      │
                                                     │     sec/op     │    sec/op     vs base                 │
PostgresClient/6144000/GetForecastAsTimeseries-4         4.826m ± ∞ ¹   5.853m ± ∞ ¹        ~ (p=1.000 n=1) ²
PostgresClient/6144000/GetForecastAtTimestamp-4         105.00m ± ∞ ¹   24.00m ± ∞ ¹        ~ (p=1.000 n=1) ²
PostgresClient/6144000/GetObservationsAsTimeseries-4     1.307m ± ∞ ¹   1.236m ± ∞ ¹        ~ (p=1.000 n=1) ²
PostgresClient/6144000/CreateForecast-4                  2.612m ± ∞ ¹   3.234m ± ∞ ¹        ~ (p=1.000 n=1) ²
geomean                                                  6.449m         4.867m        -24.52%
¹ 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 fix: update sql fix(testdata): Ensure materialzed view is refreshed Nov 7, 2025
@devsjc devsjc merged commit 9e7d69a into main Nov 7, 2025
3 checks passed
@devsjc devsjc deleted the update-sql-uk-data branch November 7, 2025 14:31
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.

3 participants