X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fscrape-job-cost.sh;h=e940bc6a59b4bc868b9baba8487c66c8af408e8f;hb=refs%2Ftags%2Fv0.89.6;hp=9bd5205e5462da455ccf2194c0cf7e4a1dfe4a4c;hpb=3702b8680891a0392a53a2e2ce8060fb75b2bbdf;p=releng%2Fglobal-jjb.git diff --git a/shell/scrape-job-cost.sh b/shell/scrape-job-cost.sh index 9bd5205e..e940bc6a 100755 --- 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: # -# JobName , BuildNumber , Date , InstanceType , Uptime , Cost1 , Cost2 +# JobName , BuildNumber , Date , InstanceType , Uptime , Cost , StackCost # # Date format: '%Y-%m-%d %H:%M:%S' +# Cost format: '%.2f' (1.29) # ############################################################################## # @@ -43,8 +44,7 @@ $debug && echo "DEBUG Enabled" 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 @@ -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 - cd "$silo_dir" + cd "$silo_dir" else echo "$(date +'%Y-%m-%d %H:%M') No Silo Directory, nothing to do" exit 0