Skip to content

[ONP-3452] - Add script to forecast costs from server to cloud#87

Open
imlogang wants to merge 2 commits into
mainfrom
ONP-3452/forcasted-costs
Open

[ONP-3452] - Add script to forecast costs from server to cloud#87
imlogang wants to merge 2 commits into
mainfrom
ONP-3452/forcasted-costs

Conversation

@imlogang

Copy link
Copy Markdown
Contributor

⚙️ Issue
https://linear.app/circleci/issue/ONP-3452/ability-to-forecast-move-to-cloud-compute-costs

Fix
This adds a new forecast-costs directory to forecast a server installs 30 day usage to Docker Gen2 resource classes.

Tests

  • Tested Updating Existing Instance
  • Installed on new instance

@linear-code

linear-code Bot commented Jul 20, 2026

Copy link
Copy Markdown

ONP-3452

Comment thread forecast-costs/check-usage.sh Outdated
Co-authored-by: Atul S <3430610+atulsingh0@users.noreply.github.com>

@marcospereira-circleci marcospereira-circleci left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Some questions, but none of them blocking progress here.

Comment thread forecast-costs/README.md
Or install the full package if you prefer:

```bash
brew install postgresql@14

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I assume yes, but will psql from PG 14 work if their PG server is 12?

Comment thread forecast-costs/README.md

```bash
sudo apt-get update
sudo apt-get install -y postgresql-client

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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?

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.

3 participants