Skip to content

Conversation

@peterdudfield
Copy link
Contributor

@peterdudfield peterdudfield commented Dec 9, 2025

Contribution Checklist

  • Have you followed the Open Climate Fix Contribution Guidelines?
  • Have you referenced the Issue this PR addresses, where applicable?
  • 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, where applicable?
  • Have you successfully run make lint with your changes locally?
  • Have you successfully run make test with your changes locally?

Warning

PRs may be closed if all the above boxes are not checked.

Changes in this Pull Request

Add some sql to add full GSP names

@peterdudfield peterdudfield requested a review from devsjc December 9, 2025 08:49
@github-actions
Copy link

github-actions bot commented Dec 9, 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-12-09T08:49:48Z","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         	     160	   7064521 ns/op
BenchmarkPostgresClient/6144000/GetForecastAtTimestamp-4          	      39	  27078711 ns/op
BenchmarkPostgresClient/6144000/GetObservationsAsTimeseries-4     	     908	   1244681 ns/op
BenchmarkPostgresClient/6144000/CreateForecast-4                  	     261	   4224866 ns/op
PASS
ok  	github.com/openclimatefix/data-platform/internal/server/postgres	189.471s
?   	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-friendly-gsp-names.txt      │
                                                     │     sec/op     │    sec/op     vs base                 │
PostgresClient/6144000/GetForecastAsTimeseries-4         4.826m ± ∞ ¹   7.065m ± ∞ ¹        ~ (p=1.000 n=1) ²
PostgresClient/6144000/GetForecastAtTimestamp-4         105.00m ± ∞ ¹   27.08m ± ∞ ¹        ~ (p=1.000 n=1) ²
PostgresClient/6144000/GetObservationsAsTimeseries-4     1.307m ± ∞ ¹   1.245m ± ∞ ¹        ~ (p=1.000 n=1) ²
PostgresClient/6144000/CreateForecast-4                  2.612m ± ∞ ¹   4.225m ± ∞ ¹        ~ (p=1.000 n=1) ²
geomean                                                  6.449m         5.632m        -12.67%
¹ need >= 6 samples for confidence interval at level 0.95
² need >= 4 samples to detect a difference at alpha level 0.05

@devsjc
Copy link
Contributor

devsjc commented Dec 9, 2025

To be honest, I think I'll probably move all of this stuff (including the original uk_gsps) out of a SQL file and into a CSV or parquet in the client repo. This can then be applied with a simple python script calling the API (that way it's agnostic to database changes and only affected by breaking changes to the API contract). It doesn't really make sense to bundle any of it with the data platform, as it isn't part of the migrations (and that way I can add the UKPN stuff to it as well). So I'll take these names you've defined here and put them in to that set of data.

@peterdudfield
Copy link
Contributor Author

That make sense, free free to close

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