Code Review
/
releng
/
global-jjb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Chore: Update pre-commit hooks
[releng/global-jjb.git]
/
shell
/
scrape-job-cost.sh
diff --git
a/shell/scrape-job-cost.sh
b/shell/scrape-job-cost.sh
index
9bd5205
..
e940bc6
100755
(executable)
--- a/
shell/scrape-job-cost.sh
+++ b/
shell/scrape-job-cost.sh
@@
-20,9
+20,10
@@
#
# Each cost file contains one or more CSV records in the following format:
#
#
# Each cost file contains one or more CSV records in the following format:
#
-# JobName , BuildNumber , Date , InstanceType , Uptime , Cost
1 , Cost2
+# JobName , BuildNumber , Date , InstanceType , Uptime , Cost
, StackCost
#
# Date format: '%Y-%m-%d %H:%M:%S'
#
# Date format: '%Y-%m-%d %H:%M:%S'
+# Cost format: '%.2f' (1.29)
#
##############################################################################
#
#
##############################################################################
#
@@
-43,8
+44,7
@@
$debug && echo "DEBUG Enabled"
set -eufo pipefail
set -eufo pipefail
-function get-year-list()
-{
+get-year-list () {
# Grab the years for each cost record use sort | uniq to get the
# list of unique years found
local list
# Grab the years for each cost record use sort | uniq to get the
# list of unique years found
local list
@@
-74,7
+74,7
@@
cost_dir=~/cost
# The Silo Directory for sandbox will get deleted periodically, so
# gracefully handle that
if [[ -d $silo_dir ]]; then
# The Silo Directory for sandbox will get deleted periodically, so
# gracefully handle that
if [[ -d $silo_dir ]]; then
- cd "$silo_dir"
+
cd "$silo_dir"
else
echo "$(date +'%Y-%m-%d %H:%M') No Silo Directory, nothing to do"
exit 0
else
echo "$(date +'%Y-%m-%d %H:%M') No Silo Directory, nothing to do"
exit 0