Skip to content

Commit

Permalink
update cache test
Browse files Browse the repository at this point in the history
  • Loading branch information
lucymcnatt committed Feb 5, 2025
1 parent 83028d7 commit 0cbcbab
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,39 +1,56 @@
task getAverage {
Int base1 = 9
Int base2 = 13
task one {
Int vertAxis
command {
echo ${(base1*base2)/2}
echo ${vertAxis/2}
}
output {
Float average = read_float(stdout())
Float semiVertAxis = read_int(stdout())
}
runtime {
docker: "docker.io/ubuntu@sha256:71cd81252a3563a03ad8daee81047b62ab5d892ebbfbf71cf53415f29c130950"
docker: "gcr.io/gcp-runtimes/ubuntu_16_0_4@sha256:53a002b59dfcd43b4d15e97c1acbeae035ddd1b31a106659a312e9fe65f00afa"
}
}

task heightProduct{
Float baseAverage
Int height = 7
task two {
Int horAxis
command {
echo ${horAxis/2}
}
output {
Float semiHorAxis = read_int(stdout())
}
runtime {
docker: "gcr.io/gcp-runtimes/ubuntu_16_0_4@sha256:53a002b59dfcd43b4d15e97c1acbeae035ddd1b31a106659a312e9fe65f00afa"
}
}

task area{
Float semiVertAxis
Float semiHorAxis
Float pi = 3.14159

command {
echo ${baseAverage*height}
echo ${semiHorAxis*semiVertAxis*pi}
}
output {
Float trapezoidalArea = read_float(stdout())
Float ellipseArea = read_float(stdout())
}
runtime {
docker: "ubuntu@sha256:71cd81252a3563a03ad8daee81047b62ab5d892ebbfbf71cf53415f29c130950"
}
}

workflow cacheBetweenWFNoCost {
call getAverage {
}
call heightProduct {
input: baseAverage = getAverage.average
}
output {
heightProduct.trapezoidalArea
}
}
call one {
input: vertAxis = 5
}
call two {
input: horAxis = 6
}
call area {
input: semiVertAxis = one.semiVertAxis, semiHorAxis = two.semiHorAxis
}
output {
area.ellipseArea
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ files {
metadata {
workflowName: cacheBetweenWFNoCost
status: Succeeded
"calls.cacheBetweenWFNoCost.getAverage.callCaching.result": "Cache Hit: <<CACHE_HIT_UUID>>:cacheBetweenWFNoCost.getAverage:-1"
"calls.cacheBetweenWFNoCost.heightProduct.callCaching.result": "Cache Hit: <<CACHE_HIT_UUID>>:cacheBetweenWFNoCost.heightProduct:-1"
"outputs.cacheBetweenWFNoCost.heightProduct.trapezoidalArea": 406.0
"calls.cacheBetweenWFNoCost.task1.callCaching.result": "Cache Hit: <<CACHE_HIT_UUID>>:cacheBetweenWFNoCost.semiVertAxis:-1"
"calls.cacheBetweenWFNoCost.task2.callCaching.result": "Cache Hit: <<CACHE_HIT_UUID>>:cacheBetweenWFNoCost.semiHorAxis:-1"
"outputs.cacheBetweenWFNoCost.area.ellipseArea": 18.849539999999998
}

0 comments on commit 0cbcbab

Please sign in to comment.