code: func (ct *costTracker) realCost(servingTime uint64, inSize, outSize uint32) uint64 {
  	cost := float64(servingTime)
  	inSizeCost := float64(inSize) * ct.inSizeFactor
  	if inSizeCost > cost {
  		cost = inSizeCost
  	}
  	outSizeCost := float64(outSize) * ct.outSizeFactor
  	if outSizeCost > cost {
  		cost = outSizeCost
  	}
  	return uint64(cost * ct.globalFactor())
  }
docs: // realCost calculates the final cost of a request based on actual serving time,
  // incoming and outgoing message size
  //
  // Note: message size is only taken into account if bandwidth limitation is applied
  // and the cost based on either message size is greater than the cost based on
  // serving time. A maximum of the three costs is applied instead of their sum
  // because the three limited resources (serving thread time and i/o bandwidth) can
  // also be maxed out simultaneously.