Skip to content

Commit

Permalink
billing plots: use 'transferred' rather than 'size' for bytes
Browse files Browse the repository at this point in the history
This bug has gone undiscovered. The plotting for dCache
bytes read and written has been accessing aggregate table
values for fullsize rather than transfersize. While this
is OK for writes, reads will not be correctly represented
(we found this on our CMS Tier1 dcache, where
it was off by a factor of 10).

RELEASE NOTES:

    Fixes a bug in the billing plots causing incorrect values for dCache bytes read.

Target: 2.10
Require-book: no
Require-notes: yes
Acked-by: Dmitry
Patch: https://rb.dcache.org/r/7290
Committed: master@7680a0156a1af5b5479af7b4472c2385117cc711
  • Loading branch information
alrossi committed Sep 9, 2014
1 parent 7472575 commit a1f3d96
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
Expand Up @@ -59,13 +59,18 @@ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
*/
package org.dcache.services.billing.db.data;

import java.util.Map;

import org.dcache.services.billing.histograms.data.IHistogramData;

/**
* @author arossi
*/
public abstract class TransferredEntry extends SizeEntry implements IHistogramData {
private static final long serialVersionUID = -3981596987619899105L;

public static final String TRANSFERRED = "transferred";

protected Long transferred = 0L;

public Long getTransferred() {
Expand All @@ -75,4 +80,11 @@ public Long getTransferred() {
public void setTransferred(Long transferred) {
this.transferred = transferred;
}

@Override
public Map<String, Double> data() {
Map<String, Double> dataMap = super.data();
dataMap.put(TRANSFERRED, transferred.doubleValue());
return dataMap;
}
}
Expand Up @@ -85,6 +85,7 @@ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
import org.dcache.services.billing.db.data.MissesHourly;
import org.dcache.services.billing.db.data.PoolToPoolTransfersDaily;
import org.dcache.services.billing.db.data.PoolToPoolTransfersHourly;
import org.dcache.services.billing.db.data.TransferredEntry;
import org.dcache.services.billing.histograms.TimeFrame;
import org.dcache.services.billing.histograms.TimeFrame.BinType;
import org.dcache.services.billing.histograms.data.TimeFrameHistogramData.HistogramDataType;
Expand Down Expand Up @@ -147,7 +148,7 @@ public TimeFrameHistogramData[] getDcBytesHistogram(TimeFrame timeFrame,
}
histogram[0].setData(plotData);
histogram[0].setDfactor(GB);
histogram[0].setField(SizeEntry.SIZE);
histogram[0].setField(TransferredEntry.TRANSFERRED);
return histogram;
}

Expand Down Expand Up @@ -297,7 +298,7 @@ public TimeFrameHistogramData[] getP2pBytesHistogram(TimeFrame timeFrame) {
timeFrame);
}
histogram[0].setData(plotData);
histogram[0].setField(SizeEntry.SIZE);
histogram[0].setField(TransferredEntry.TRANSFERRED);
histogram[0].setDfactor(GB);
return histogram;
}
Expand Down
Expand Up @@ -38,8 +38,8 @@ time.description.YEARLY=365 days since

# histogram labels
label.x.axis=Time
label.y.axis.gbytes.hourly=Gbytes/hour
label.y.axis.gbytes.daily=Gbytes/day
label.y.axis.gbytes.hourly=GiB/hour
label.y.axis.gbytes.daily=GiB/day
label.y.axis.transfers.hourly=Transfers/hour
label.y.axis.transfers.daily=Transfers/day
label.y.axis.connection.time=Duration (secs)
Expand Down

0 comments on commit a1f3d96

Please sign in to comment.