-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Estimate agg stats based on weighted mean
* Use cpu hours as weight to get agg cpu usage * Use cpu mem hours as weight to get agg cpu mem usage * Use gpu hours as weight for gpu ang gpu mem usage * Use weighted mean when returning current usage Signed-off-by: Mahendra Paipuri <[email protected]>
- Loading branch information
1 parent
a776496
commit 748522a
Showing
13 changed files
with
559 additions
and
256 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
12 changes: 12 additions & 0 deletions
12
pkg/api/db/migrations/000006_alter_unit_usage_tables.up.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ALTER TABLE units RENAME COLUMN total_cpu_billing TO total_cputime_seconds; | ||
ALTER TABLE units RENAME COLUMN total_gpu_billing TO total_gputime_seconds; | ||
ALTER TABLE units RENAME COLUMN total_misc_billing TO total_misctime_seconds; | ||
ALTER TABLE usage RENAME COLUMN total_cpu_billing TO total_cputime_seconds; | ||
ALTER TABLE usage RENAME COLUMN total_gpu_billing TO total_gputime_seconds; | ||
ALTER TABLE usage RENAME COLUMN total_misc_billing TO total_misctime_seconds; | ||
ALTER TABLE units RENAME COLUMN elapsed_raw TO total_walltime_seconds; | ||
ALTER TABLE usage ADD COLUMN "total_walltime_seconds" integer; | ||
ALTER TABLE units ADD COLUMN "total_cpumemtime_seconds" integer; | ||
ALTER TABLE units ADD COLUMN "total_gpumemtime_seconds" integer; | ||
ALTER TABLE usage ADD COLUMN "total_cpumemtime_seconds" integer; | ||
ALTER TABLE usage ADD COLUMN "total_gpumemtime_seconds" integer; |
12 changes: 12 additions & 0 deletions
12
pkg/api/db/migrations/000006_alter_units_usage_tables.down.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ALTER TABLE usage DROP COLUMN total_gpumemtim_seconds; | ||
ALTER TABLE usage DROP COLUMN total_cpumemtim_seconds; | ||
ALTER TABLE units DROP COLUMN total_gpumemtim_seconds; | ||
ALTER TABLE units DROP COLUMN total_cpumemtim_seconds; | ||
ALTER TABLE usage DROP COLUMN total_walltime_seconds; | ||
ALTER TABLE units RENAME COLUMN total_walltime_seconds TO elapsed_raw; | ||
ALTER TABLE usage RENAME COLUMN total_misctime_seconds TO total_misc_billing; | ||
ALTER TABLE usage RENAME COLUMN total_gputime_seconds TO total_gpu_billing; | ||
ALTER TABLE usage RENAME COLUMN total_cputime_seconds TO total_cpu_billing; | ||
ALTER TABLE units RENAME COLUMN total_misctime_seconds TO total_misc_billing; | ||
ALTER TABLE units RENAME COLUMN total_gputime_seconds TO total_gpu_billing; | ||
ALTER TABLE units RENAME COLUMN total_cputime_seconds TO total_cpu_billing; |
Oops, something went wrong.