Doing it multiple times while probably not dangerous to the results seems
possibly wasteful at least. Will change it, thanks


On Mon, Apr 7, 2014 at 9:52 AM, Ryan LeCompte <notifications@github.com>wrote:

> In
> summingbird-storm/src/main/scala/com/twitter/summingbird/storm/StoreStatReporter.scala:
>
> > +  val multiMergeTupleFailedMetric = buildMetric("multiMergeTupleFailed")
> > +  val mergeFailedMetric = buildMetric("mergeFailed")
> > +  val multiMergeTuplesMetric = buildMetric("multiMergeTuples")
> > +
> > +
> > +  override def traceMerge(kv: (K, V), request: Future[Option[V]]) = {
> > +    mergeMetric.incr()
> > +    request.onFailure { _ =>
> > +      mergeFailedMetric.incr()
> > +    }.unit
> > +  }
> > +
> > +  override def traceMultiMerge[K1 <: K](kvs: Map[K1, V], request: Map[K1, Future[Option[V]]]) = {
> > +    multiMergeMetric.incr()
> > +    multiMergeTuplesMetric.incrBy(request.size)
> > +    request.mapValues(_.onFailure { _ =>
>
> Yeah, I usually just map instead unless the laziness is really
> required/desired. It may not be an issue here though, I'm not too familiar
> with the details on how it's used.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/twitter/summingbird/pull/495/files#r11353185>
> .
>