[ONP-3452] - Add script to forecast costs from server to cloud#87
Open
imlogang wants to merge 2 commits into
Open
[ONP-3452] - Add script to forecast costs from server to cloud#87imlogang wants to merge 2 commits into
imlogang wants to merge 2 commits into
Conversation
atulsingh0
approved these changes
Jul 20, 2026
Co-authored-by: Atul S <3430610+atulsingh0@users.noreply.github.com>
marcospereira-circleci
left a comment
There was a problem hiding this comment.
Some questions, but none of them blocking progress here.
| Or install the full package if you prefer: | ||
|
|
||
| ```bash | ||
| brew install postgresql@14 |
There was a problem hiding this comment.
I assume yes, but will psql from PG 14 work if their PG server is 12?
|
|
||
| ```bash | ||
| sudo apt-get update | ||
| sudo apt-get install -y postgresql-client |
There was a problem hiding this comment.
This most likely will get whatever is the latest version (18?). Similar to the comment above, I think it will work, but it's worth checking.
| SELECT | ||
| COUNT(1) AS total_jobs, | ||
| ROUND(SUM(EXTRACT(EPOCH FROM (e.ended_at - s.started_at)) / 60)::numeric, 2) AS total_minutes | ||
| FROM public.job_started_events s |
There was a problem hiding this comment.
It seems like this will be quite a large table (and I'm not sure about its structure/indexes).
Do we need to instruct/document that this script should be run when their Server installation is not under load?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
⚙️ Issue
https://linear.app/circleci/issue/ONP-3452/ability-to-forecast-move-to-cloud-compute-costs
✅ Fix
This adds a new
forecast-costsdirectory to forecast a server installs 30 day usage to Docker Gen2 resource classes.❓ Tests