You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/08/08 15:06:03 UTC

[GitHub] cbickel commented on a change in pull request #3747: Memory based loadbalancing

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:
users@infra.apache.org


With regards,
Apache Git Services