Skip to content

chore(docs): Generate gRPC API documentation#168

Merged
devsjc merged 4 commits into
mainfrom
devsjc/docs
Jun 5, 2026
Merged

chore(docs): Generate gRPC API documentation#168
devsjc merged 4 commits into
mainfrom
devsjc/docs

Conversation

@devsjc
Copy link
Copy Markdown
Contributor

@devsjc devsjc commented Jun 5, 2026

Fixes a bug whereby adding an initialization timestamp to a
GetForecastAsTimeseries request would then prevent it from returning any
p-values. Also adds documentation.

  • 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.

devsjc added 4 commits May 27, 2026 15:02
Fixes a bug whereby adding an initialization timestamp to a
GetForecastAsTimeseries request would then prevent it from returning any
p-values.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

Benchmark Results

Benchmark results
Generating Markdown API docs...
?   	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-06-05T14:20:27Z","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         	      67	  17120084 ns/op
BenchmarkPostgresClient/small/GetForecastAtTimestamp-4          	     271	   4196553 ns/op
BenchmarkPostgresClient/small/GetObservationsAsTimeseries-4     	     968	   1181664 ns/op
BenchmarkPostgresClient/small/CreateForecast-4                  	     100	  11475772 ns/op
BenchmarkPostgresClient/small/StreamForecastData-4              	      14	  80068559 ns/op
PASS
ok  	github.com/openclimatefix/data-platform/internal/server/postgres	63.986s
?   	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         17.42m ± ∞ ¹
PostgresClient/small/GetForecastAtTimestamp-4          4.437m ± ∞ ¹
PostgresClient/small/GetObservationsAsTimeseries-4     1.305m ± ∞ ¹
PostgresClient/small/CreateForecast-4                  13.91m ± ∞ ¹
PostgresClient/small/StreamForecastData-4              100.2m ± ∞ ¹
geomean                                                10.71m
¹ need >= 6 samples for confidence interval at level 0.95

cpu: AMD EPYC 9V74 80-Core Processor                
                                                   │ bench-devsjc-docs.txt │
                                                   │        sec/op         │
PostgresClient/small/GetForecastAsTimeseries-4                17.12m ± ∞ ¹
PostgresClient/small/GetForecastAtTimestamp-4                 4.197m ± ∞ ¹
PostgresClient/small/GetObservationsAsTimeseries-4            1.182m ± ∞ ¹
PostgresClient/small/CreateForecast-4                         11.48m ± ∞ ¹
PostgresClient/small/StreamForecastData-4                     80.07m ± ∞ ¹
geomean                                                       9.515m
¹ need >= 6 samples for confidence interval at level 0.95

@devsjc devsjc changed the title fix(api): Return other statistics in GetForecastAsTimeseries chore(docs): Generate gRPC API documentation Jun 5, 2026
@devsjc devsjc merged commit cec71fa into main Jun 5, 2026
1 check passed
@devsjc devsjc deleted the devsjc/docs branch June 5, 2026 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.

1 participant