Skip to content

Commit

Permalink
unreported storage values default to 0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
markjschreiber committed Aug 15, 2024
1 parent 67c5b8f commit 846adcb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions omics/cli/run_analyzer/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)
Expand Down

0 comments on commit 846adcb

Please sign in to comment.