-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aede5f7
commit 97c807c
Showing
2 changed files
with
12 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
12 changes: 12 additions & 0 deletions
12
internal/repository/migrations/sqlite3/08_add-footprint.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 job ADD COLUMN energy REAL NOT NULL DEFAULT 0.0; | ||
|
||
ALTER TABLE job ADD COLUMN footprint TEXT DEFAULT NULL; | ||
UPDATE job SET footprint = '{"flops_any_avg": 0.0}'; | ||
UPDATE job SET footprint = json_replace(footprint, '$.flops_any_avg', job.flops_any_avg); | ||
UPDATE job SET footprint = json_insert(footprint, '$.mem_bw_avg', job.mem_bw_avg); | ||
UPDATE job SET footprint = json_insert(footprint, '$.mem_used_max', job.mem_used_max); | ||
UPDATE job SET footprint = json_insert(footprint, '$.load_avg', job.load_avg); | ||
ALTER TABLE job DROP flops_any_avg; | ||
ALTER TABLE job DROP mem_bw_avg; | ||
ALTER TABLE job DROP mem_used_max; | ||
ALTER TABLE job DROP load_avg; |