cbickel commented on a change in pull request #3747: Memory based loadbalancing URL: https://github.com/apache/incubator-openwhisk/pull/3747#discussion_r208618430
########## File path: common/scala/src/main/scala/whisk/core/entity/Size.scala ########## @@ -69,6 +69,23 @@ case class ByteSize(size: Long, unit: SizeUnits.Unit) extends Ordered[ByteSize] ByteSize(commonSize, commonUnit) } + def *(other: Int): ByteSize = { + ByteSize(toBytes * other, SizeUnits.BYTE) + } + + def /(other: ByteSize): Double = { + // Without throwing the exception the result would be `Infinity` here Review comment: What are the reasons for using a Try here? On dividing `Int`s, you also get the response directly, instead of a `Try`, don't you? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services