Skip to content

feat(proto): Add location names filter to ListLocations#157

Merged
devsjc merged 2 commits intomainfrom
devsjc/new-routes
Apr 24, 2026
Merged

feat(proto): Add location names filter to ListLocations#157
devsjc merged 2 commits intomainfrom
devsjc/new-routes

Conversation

@devsjc
Copy link
Copy Markdown
Contributor

@devsjc devsjc commented Apr 23, 2026

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

Adds a filter to the ListLocations route that allows for using the location names directly. Note that this may start to cause problems when the Sites database is merged in, as we may end up with duplicate names. One to think about.

@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.004s
{"level":"debug","time":"2026-04-23T16:01:54Z","message":"Completed migrations"}
goos: linux
goarch: amd64
pkg: github.com/openclimatefix/data-platform/internal/server/postgres
cpu: AMD EPYC 9V74 80-Core Processor                
BenchmarkPostgresClient/small/GetForecastAsTimeseries-4         	      94	  11936462 ns/op
BenchmarkPostgresClient/small/GetForecastAtTimestamp-4          	     393	   2910772 ns/op
BenchmarkPostgresClient/small/GetObservationsAsTimeseries-4     	    1296	    870204 ns/op
BenchmarkPostgresClient/small/CreateForecast-4                  	     142	   8208455 ns/op
PASS
ok  	github.com/openclimatefix/data-platform/internal/server/postgres	77.109s
?   	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 │
                                                   │     sec/op     │
PostgresClient/small/GetForecastAsTimeseries-4         15.93m ± ∞ ¹
PostgresClient/small/GetForecastAtTimestamp-4          4.140m ± ∞ ¹
PostgresClient/small/GetObservationsAsTimeseries-4     1.255m ± ∞ ¹
PostgresClient/small/CreateForecast-4                  12.80m ± ∞ ¹
geomean                                                5.704m
¹ need >= 6 samples for confidence interval at level 0.95

cpu: AMD EPYC 9V74 80-Core Processor                
                                                   │ bench-devsjc-new-routes.txt │
                                                   │           sec/op            │
PostgresClient/small/GetForecastAsTimeseries-4                      11.94m ± ∞ ¹
PostgresClient/small/GetForecastAtTimestamp-4                       2.911m ± ∞ ¹
PostgresClient/small/GetObservationsAsTimeseries-4                  870.2µ ± ∞ ¹
PostgresClient/small/CreateForecast-4                               8.208m ± ∞ ¹
geomean                                                             3.969m
¹ need >= 6 samples for confidence interval at level 0.95

@devsjc devsjc merged commit 69510c1 into main Apr 24, 2026
4 checks passed
@devsjc devsjc deleted the devsjc/new-routes branch April 24, 2026 06:46
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