summaryrefslogtreecommitdiffstats
path: root/src/bm
diff options
context:
space:
mode:
Diffstat (limited to 'src/bm')
-rw-r--r--src/bm/bmrequest.cpp21
-rw-r--r--src/bm/bmrequest.h8
-rw-r--r--src/bm/index.cpp31
3 files changed, 56 insertions, 4 deletions
diff --git a/src/bm/bmrequest.cpp b/src/bm/bmrequest.cpp
index 9300dc3..5f008b4 100644
--- a/src/bm/bmrequest.cpp
+++ b/src/bm/bmrequest.cpp
@@ -4848,8 +4848,15 @@ QByteArray BMRequest_IndexGetValues::toRequestBuffer(QString *)
QString request =
QString(
"<request type=\"%1\"><args baseTimestamp=\"%2\" medianWinSize=\"%3\" "
- "cacheKey=\"%4\" />")
- .arg(name()).arg(baseTimestamp).arg(medianWinSize).arg(cacheKey);
+ "cacheKey=\"%4\" dataQualityStats=\"%5\" dqStatsDiffTol=\"%6\" "
+ "dqStatsStabTol=\"%7\" />")
+ .arg(name())
+ .arg(baseTimestamp)
+ .arg(medianWinSize)
+ .arg(cacheKey)
+ .arg(dataQualityStats ? 1 : 0)
+ .arg(dqStatsDiffTol)
+ .arg(dqStatsStabTol);
for (int i = 0; i < testCaseFilter.size(); ++i)
request += QString("<testCase name=\"%1\" />").arg(testCaseFilter.at(i));
@@ -4911,6 +4918,14 @@ QByteArray BMRequest_IndexGetValues::toReplyBuffer()
medianWinSize = argsElem.attributeNode("medianWinSize").value().toInt(&ok);
Q_ASSERT(ok);
+ // Get data quality stats params ...
+ dataQualityStats = argsElem.attributeNode("dataQualityStats").value().toInt(&ok);
+ Q_ASSERT(ok);
+ dqStatsDiffTol = argsElem.attributeNode("dqStatsDiffTol").value().toDouble(&ok);
+ Q_ASSERT(ok);
+ dqStatsStabTol = argsElem.attributeNode("dqStatsStabTol").value().toInt(&ok);
+ Q_ASSERT(ok);
+
// Get filters ...
QDomNodeList testCaseNodes = doc.elementsByTagName("testCase");
for (int i = 0; i < testCaseNodes.size(); ++i)
@@ -5085,7 +5100,7 @@ QByteArray BMRequest_IndexGetValues::toReplyBuffer()
QList<qreal> indexValues;
QList<int> contrCounts;
- QList<QList<Index::RankedInfo> > topContr;
+ QList<QList<Index::RankedInfo> > topContr; // Top contributors for each index value
const int topContrLimit = 10; // ### hard-coded for now!
QString error_;
if (!index.computeValues(
diff --git a/src/bm/bmrequest.h b/src/bm/bmrequest.h
index 89c50f3..43accf9 100644
--- a/src/bm/bmrequest.h
+++ b/src/bm/bmrequest.h
@@ -568,10 +568,13 @@ public:
const int baseTimestamp, const int medianWinSize,
const QString &cacheKey, const QStringList &testCaseFilter,
const QStringList &metricFilter, const QStringList &platformFilter,
- const QStringList &hostFilter, const QStringList &branchFilter)
+ const QStringList &hostFilter, const QStringList &branchFilter,
+ const bool dataQualityStats, const qreal dqStatsDiffTol, const qreal dqStatsStabTol)
: baseTimestamp(baseTimestamp), medianWinSize(medianWinSize), cacheKey(cacheKey)
, testCaseFilter(testCaseFilter), metricFilter(metricFilter)
, platformFilter(platformFilter), hostFilter(hostFilter), branchFilter(branchFilter)
+ , dataQualityStats(dataQualityStats), dqStatsDiffTol(dqStatsDiffTol)
+ , dqStatsStabTol(dqStatsStabTol)
{}
BMRequest_IndexGetValues(const QDomDocument &doc) : BMRequest(doc) {}
@@ -584,6 +587,9 @@ private:
mutable QStringList platformFilter;
mutable QStringList hostFilter;
mutable QStringList branchFilter;
+ mutable bool dataQualityStats;
+ mutable qreal dqStatsDiffTol;
+ mutable qreal dqStatsStabTol;
QString name() const { return "IndexGetValues"; }
QByteArray toRequestBuffer(QString *error);
diff --git a/src/bm/index.cpp b/src/bm/index.cpp
index 6bc6c78..be29787 100644
--- a/src/bm/index.cpp
+++ b/src/bm/index.cpp
@@ -280,5 +280,36 @@ bool IndexAlgorithm1::computeValues(
}
}
+
+ const bool computeDataQualityStatistics = false; // 4 NOW
+ if (computeDataQualityStatistics) {
+ // Step 1: Compute the MaxESSTotalCount and MaxESSStableCount for each
+ // contributing RH (compute for the exact median-smoothed
+ // values that formed the basis for computing the index)
+ //
+ // Step 2: Compute the complete distribution of MaxESSTotalCount
+ // (note that the number of distinct counts are likely to be only a small
+ // fraction of the number of RHs):
+ //
+ // TC(c1) = <# of RHs with a MaxESSTotalCount of c1>
+ // TC(c2) = <# of RHs with a MaxESSTotalCount of c2>
+ // ...
+ // TC(cN) = <# of RHs with a MaxESSTotalCount of cN>
+ //
+ // (TC = Total Count, and N is number of distinct counts)
+ //
+ // Step 3: Compute the percentile distribution (for the 10 levels 10%, 20%, ..., 100%)
+ // of the SF (stability fraction) values (where the SF for a given
+ // RH is MaxESSStableCount / MaxESSTotalCount):
+ //
+ // SFP(100) = <the max SF value for the worst 100% of the RHs (i.e. all RHs!)>
+ // SFP(90) = <the max SF value for the worst 90% of the RHs>
+ // SFP(80) = <the max SF value for the worst 80% of the RHs>
+ // ...
+ // SFP(10) = <the max SF value for the worst 10% of the RHs>
+ //
+ // (SFP = Stability Fraction Percentile)
+ }
+
return true;
}