Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GAWB-4026: Initial simple cost calculation #2

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

ansingh7115
Copy link

@ansingh7115 ansingh7115 commented Jan 18, 2019

What's missing:

  • Tests don't all pass
  • Some clean up

0.010931)
assertEquals(r, expectedResponse)
}
res.fold[Unit](e => throw e, identity)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should be able to do res == Right(xx)


private def getPriceOfCall(call: Call, priceList: PriceList, startTime: Instant, endTime: Instant): Either[String, Double] = {
for {
_ <- if (call.status.asString == "Success") Right(()) else Left(s"Call {name} status was ${call.status.asString}.") // not evaluating workflows that are in flight or Failed or Aborted or whatever
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we not evaluating aborted or failed? They cost money too.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! I meant to change that to evaluating all terminal statuses, not just successes



final case class RuntimeAttributes(cpuNumber: CpuNumber,
disks: Disks,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can there be more than one disk?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm actually not sure, I will ask Cromwell people

Copy link
Author

@ansingh7115 ansingh7115 Jan 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The answer is yes, I'll turn it into a list

}

private def getCallDuration(call: Call, cromwellStartTime: Instant, cromwellEndTime: Instant): Long = {
// ToDo: add option to ignore preempted calls and just return 0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't preempted calls cost money too?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh - this comment was some vestige of a thing we aren't doing anymore (I think earlier we were just going to make the calculation ignore preemptibility for an initial iteration). I'll remove the comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants