Skip to content

Commit

Permalink
renames some column names and clarifies their descriptions (#46)
Browse files Browse the repository at this point in the history
* renames some column names and clarifies their descriptions

* update column descriptions

* bump dependencies
markjschreiber authored Aug 14, 2024
1 parent 97f921a commit c8ecbef
Showing 4 changed files with 191 additions and 167 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -360,13 +360,16 @@ The CSV output by the command above includes the following columns:
* __startTime__ : Start timestamp for the workflow run or task (UTC time)
* __stopTime__ : Stop timestamp for the workflow run or task (UTC time)
* __runningSeconds__ : Approximate workflow run or task runtime (in seconds)
* __cpusRequested__ : The number of vCPU requested by the workflow task
* __gpusRequested__ : The number of GPUs requested by the workflow task
* __memoryRequestedGiB__ : Gibibytes of memory requested by the workflow task
* __sizeReserved__ : Requested storage capacity (workflow run) or Omics instance size (workflow task)
* __sizeMinimum__ : Minimum recommended storage capacity or Omics instance size, based on the measured storage/CPU/memory utilization
* __estimatedUSD__ : Estimated Omics charges (USD) based on _sizeReserved_ and _runningSeconds_
* __minimumUSD__ : Estimated Omics charges (USD) based on _sizeMinimum_ and _runningSeconds_
* __cpuUtilization__ : CPU utilization (_cpusMaximum_ / _cpusReserved_) for workflow task(s)
* __memoryUtilization__ : Memory utilization (_memoryMaximumGiB_ / _memoryReservedGiB_) for the workflow task(s)
* __storageUtilization__ : Storage utilization (_storageMaximumGiB_ / _storageReservedGiB_) for the workflow run
* __estimatedUSD__ : Estimated Omics charges (USD) for the workflow based on _sizeReserved_ and _runningSeconds_
* __minimumUSD__ : Estimated Omics charges (USD) for the workflow based on the recommended _sizeMinimum_ and _runningSeconds_
* __cpuUtilizationRatio__ : CPU utilization (_cpusMaximum_ / _cpusReserved_) for workflow task(s)
* __memoryUtilizationRatio__ : Memory utilization (_memoryMaximumGiB_ / _memoryReservedGiB_) for the workflow task(s)
* __storageUtilizationRatio__ : Storage utilization (_storageMaximumGiB_ / _storageReservedGiB_) for the workflow run
* __cpusReserved__ : vCPUs reserved for workflow task(s)
* __cpusMaximum__ : Maximum vCPUs used during a single 1-minute interval
* __cpusAverage__ : Average vCPUs used by workflow task(s)
14 changes: 7 additions & 7 deletions omics/cli/run_analyzer/__main__.py
Original file line number Diff line number Diff line change
@@ -309,17 +309,17 @@ def add_metrics(res, resources, pricing):
cpus_res = metrics.get("cpusReserved")
cpus_max = metrics.get("cpusMaximum")
if cpus_res and cpus_max:
metrics["cpuUtilization"] = float(cpus_max) / float(cpus_res)
metrics["cpuUtilizationRatio"] = float(cpus_max) / float(cpus_res)
gpus_res = metrics.get("gpusReserved")
mem_res = metrics.get("memoryReservedGiB")
mem_max = metrics.get("memoryMaximumGiB")
if mem_res and mem_max:
metrics["memoryUtilization"] = float(mem_max) / float(mem_res)
metrics["memoryUtilizationRatio"] = float(mem_max) / float(mem_res)
store_res = metrics.get("storageReservedGiB")
store_max = metrics.get("storageMaximumGiB")
store_avg = metrics.get("storageAverageGiB")
if store_res and store_max:
metrics["storageUtilization"] = float(store_max) / float(store_res)
metrics["storageUtilizationRatio"] = float(store_max) / float(store_res)

storage_type = res.get("storageType")

@@ -459,9 +459,9 @@ def tocsv(val):
"sizeMinimum",
"estimatedUSD",
"minimumUSD",
"cpuUtilization",
"memoryUtilization",
"storageUtilization",
"cpuUtilizationRatio",
"memoryUtilizationRatio",
"storageUtilizationRatio",
"cpusReserved",
"cpusMaximum",
"cpusAverage",
@@ -478,7 +478,7 @@ def tocsv(val):
hrdrs_map = {
"cpus": "cpusRequested",
"gpus": "gpusRequested",
"memory": "memoryRequested",
"memory": "memoryRequestedGiB",
}

formatted_headers = [hrdrs_map.get(h, h) for h in hdrs]
321 changes: 171 additions & 150 deletions poetry.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -14,11 +14,11 @@ packages = [{ include = "omics" }]

[tool.poetry.dependencies]
python = "^3.10"
s3transfer = "^0.7.0"
boto3 = "^1.28.83"
mypy-boto3-omics = "^1.28.83"
boto3-stubs = "^1.34.124"
botocore-stubs = "^1.31.83"
s3transfer = "^0.10.2"
boto3 = "^1.34.160"
mypy-boto3-omics = "^1.34.95"
boto3-stubs = "^1.34.160"
botocore-stubs = "^1.34.160"
docopt = "^0.6.2"
python-dateutil = "^2.8.2"

0 comments on commit c8ecbef

Please sign in to comment.