这是indexloc提供的服务,不要输入任何密码
Skip to content

Cache get-benchmarks #494

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 28, 2019
Merged

Cache get-benchmarks #494

merged 3 commits into from
Oct 28, 2019

Conversation

CaseyHillers
Copy link
Contributor

Following #484, this caches the endpoint that returns all the time series history for the different benchmarks. Currently, it takes ~37 seconds to return, and this will bring it to under a second when returning from cache.

Future Work

  • Caching the get-timeseries-history endpoint, but we need to move the POST parameter to GET params. CacheRequestHandler stores responses by the URI and query parameters, and does not use the POST body.

@@ -47,7 +47,12 @@ Future<void> main() async {
'/api/debug/reset-pending-tasks': DebugResetPendingTasks(config, authProvider),

'/api/public/build-status': GetBuildStatus(config),
'/api/public/get-benchmarks': GetBenchmarks(config),
'/api/public/get-benchmarks': CacheRequestHandler<Body>(
cache: await cacheService.redisCache(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're calling await cacheService.redisCache() twice -- can you store it as a local variable and reuse it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

Copy link
Contributor

@digiter digiter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

4 participants