diff --git a/README.md b/README.md index 8233027..94ef5fb 100644 --- a/README.md +++ b/README.md @@ -381,6 +381,9 @@ The CSV output by the command above includes the following columns: * __storageMaximumGiB__ : Maximum gibibytes of storage used during a single 1-minute interval * __storageAverageGiB__ : Average gibibytes of storage used by the workflow run +> [!WARNING] +> At this time AWS HealthOmics does not report the average or maximum storage used by runs that use "DYNAMIC" storage. Because of this limitation the `storageMaximumGiB` and `storageAverageGiB` are set to zero and will not be included in the estimate run cost. + #### Output workflow run manifest in JSON format ```bash diff --git a/omics/cli/run_analyzer/__main__.py b/omics/cli/run_analyzer/__main__.py index a4d736f..4c8fefb 100755 --- a/omics/cli/run_analyzer/__main__.py +++ b/omics/cli/run_analyzer/__main__.py @@ -318,9 +318,9 @@ def add_metrics(res, resources, pricing): mem_max = metrics.get("memoryMaximumGiB") if mem_res and mem_max: metrics["memoryUtilizationRatio"] = float(mem_max) / float(mem_res) - store_res = metrics.get("storageReservedGiB") - store_max = metrics.get("storageMaximumGiB") - store_avg = metrics.get("storageAverageGiB") + store_res = metrics.get("storageReservedGiB", 0.0) + store_max = metrics.get("storageMaximumGiB", 0.0) + store_avg = metrics.get("storageAverageGiB", 0.0) if store_res and store_max: metrics["storageUtilizationRatio"] = float(store_max) / float(store_res) @@ -337,7 +337,7 @@ def add_metrics(res, resources, pricing): price_resource_type = PRICE_RESOURCE_TYPE_DYNAMIC_RUN_STORAGE capacity = store_max charged = store_avg - + # Get price for actually used storage (approx. for dynamic storage) gib_hrs = charged * running / SECS_PER_HOUR price = get_pricing(pricing, price_resource_type, region, gib_hrs)