public static double calculateStorageCost(RestRequest restRequest, long size) {
    return RestUtils.isUploadRequest(restRequest) ? size / (double) QuotaUtils.BYTES_IN_GB : 0;
  }
Calculate the storage cost incurred to serve a request.
@param restRequest {@link RestRequest} to find type of request.
@param size size of the blob or chunk.
@return storage cost.
ambry-quota/src/main/java/com/github/ambry/quota/QuotaUtils.java