Skip to content
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

Some convenient interface for determining the energy cost of individual reducer runs #1943

Open
bfops opened this issue Nov 5, 2024 · 0 comments

Comments

@bfops
Copy link
Collaborator

bfops commented Nov 5, 2024

Whenever we run a reducer, we should give the module owner / developer some interface to determine how much energy it consumed. Note that this information is exposed via the WebSocket API (at least as of writing, pgoldman 2024-08-08), but not passed through to the SDKs. Exposing it in the SDKs is not necessarily the most useful place for it, and we should consider whether we want non-owners / anonymous clients to be able to access this information. Likely there should be some way to get this from the CLI. The simplest version is probably having the host log to the module/database's logs after each reducer run with the reducer name, arguments (truncated to some reasonable length), caller identity and address, exit status and energy consumed; then developers could use the spacetime logs CLI command to access it. A slightly better version might be to keep that data in a separate file, to be queried by a different CLI command. More interesting would be to additionally provide percentiles, averages, maximum energy values, cumulative costs, &c for individual reducers and for the whole module.

This data might be exposed via Prometheus / Grafana already for web dashboard users, but it should additionally be available via the CLI for standalone users, though that interface may be less user friendly and provide less analysis.

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

No branches or pull requests

1 participant