Lines Matching refs:samples
668 SingleOperationStatistics calculateSingleOperationStatistics (const std::vector<T>& samples, deUint64 T::SampleType::*target)
671 std::vector<deUint64> values(samples.size());
673 for (int ndx = 0; ndx < (int)samples.size(); ++ndx)
674 values[ndx] = samples[ndx].duration.*target;
688 void calculateBasicStatistics (StatisticsType& stats, const LineParametersWithConfidence& fit, const std::vector<SampleType>& samples, int SampleType::*predictor)
690 std::vector<deUint64> values(samples.size());
692 for (int ndx = 0; ndx < (int)samples.size(); ++ndx)
693 values[ndx] = samples[ndx].duration.fitResponseDuration;
697 std::vector<float> processingRates(samples.size());
699 for (int ndx = 0; ndx < (int)samples.size(); ++ndx)
702 processingRates[ndx] = samples[ndx].*predictor / timeInSeconds;
712 std::vector<float> timeDiffs(samples.size());
714 for (int ndx = 0; ndx < (int)samples.size(); ++ndx)
716 const float prediction = samples[ndx].*predictor * fit.coefficient + fit.offset;
729 std::vector<float> relativeDiffs(samples.size());
731 for (int ndx = 0; ndx < (int)samples.size(); ++ndx)
733 const float prediction = samples[ndx].*predictor * fit.coefficient + fit.offset;
763 void calculateBasicTransferStatistics (StatisticsType& stats, const LineParametersWithConfidence& fit, const std::vector<SampleType>& samples)
765 calculateBasicStatistics(stats, fit, samples, &SampleType::writtenSize);
769 void calculateBasicRenderStatistics (StatisticsType& stats, const LineParametersWithConfidence& fit, const std::vector<SampleType>& samples)
771 calculateBasicStatistics(stats, fit, samples, &SampleType::renderDataSize);
774 static SingleCallStatistics calculateSampleStatistics (const LineParametersWithConfidence& fit, const std::vector<UploadSampleResult<SingleOperationDuration> >& samples)
778 calculateBasicTransferStatistics(stats, fit, samples);
783 static MapCallStatistics calculateSampleStatistics (const LineParametersWithConfidence& fit, const std::vector<UploadSampleResult<MapBufferRangeDuration> >& samples)
787 calculateBasicTransferStatistics(stats, fit, samples);
789 stats.map = calculateSingleOperationStatistics(samples, &MapBufferRangeDuration::mapDuration);
790 stats.unmap = calculateSingleOperationStatistics(samples, &MapBufferRangeDuration::unmapDuration);
791 stats.write = calculateSingleOperationStatistics(samples, &MapBufferRangeDuration::writeDuration);
792 stats.alloc = calculateSingleOperationStatistics(samples, &MapBufferRangeDuration::allocDuration);
797 static MapFlushCallStatistics calculateSampleStatistics (const LineParametersWithConfidence& fit, const std::vector<UploadSampleResult<MapBufferRangeFlushDuration> >& samples)
801 calculateBasicTransferStatistics(stats, fit, samples);
803 stats.map = calculateSingleOperationStatistics(samples, &MapBufferRangeFlushDuration::mapDuration);
804 stats.unmap = calculateSingleOperationStatistics(samples, &MapBufferRangeFlushDuration::unmapDuration);
805 stats.write = calculateSingleOperationStatistics(samples, &MapBufferRangeFlushDuration::writeDuration);
806 stats.flush = calculateSingleOperationStatistics(samples, &MapBufferRangeFlushDuration::flushDuration);
807 stats.alloc = calculateSingleOperationStatistics(samples, &MapBufferRangeFlushDuration::allocDuration);
812 static MapCallStatistics calculateSampleStatistics (const LineParametersWithConfidence& fit, const std::vector<UploadSampleResult<MapBufferRangeDurationNoAlloc> >& samples)
816 calculateBasicTransferStatistics(stats, fit, samples);
818 stats.map = calculateSingleOperationStatistics(samples, &MapBufferRangeDurationNoAlloc::mapDuration);
819 stats.unmap = calculateSingleOperationStatistics(samples, &MapBufferRangeDurationNoAlloc::unmapDuration);
820 stats.write = calculateSingleOperationStatistics(samples, &MapBufferRangeDurationNoAlloc::writeDuration);
825 static MapFlushCallStatistics calculateSampleStatistics (const LineParametersWithConfidence& fit, const std::vector<UploadSampleResult<MapBufferRangeFlushDurationNoAlloc> >& samples)
829 calculateBasicTransferStatistics(stats, fit, samples);
831 stats.map = calculateSingleOperationStatistics(samples, &MapBufferRangeFlushDurationNoAlloc::mapDuration);
832 stats.unmap = calculateSingleOperationStatistics(samples, &MapBufferRangeFlushDurationNoAlloc::unmapDuration);
833 stats.write = calculateSingleOperationStatistics(samples, &MapBufferRangeFlushDurationNoAlloc::writeDuration);
834 stats.flush = calculateSingleOperationStatistics(samples, &MapBufferRangeFlushDurationNoAlloc::flushDuration);
839 static RenderReadStatistics calculateSampleStatistics (const LineParametersWithConfidence& fit, const std::vector<RenderSampleResult<RenderReadDuration> >& samples)
843 calculateBasicRenderStatistics(stats, fit, samples);
845 stats.render = calculateSingleOperationStatistics(samples, &RenderReadDuration::renderDuration);
846 stats.read = calculateSingleOperationStatistics(samples, &RenderReadDuration::readDuration);
847 stats.total = calculateSingleOperationStatistics(samples, &RenderReadDuration::totalDuration);
852 static RenderReadStatistics calculateSampleStatistics (const LineParametersWithConfidence& fit, const std::vector<RenderSampleResult<UnrelatedUploadRenderReadDuration> >& samples)
856 calculateBasicRenderStatistics(stats, fit, samples);
858 stats.render = calculateSingleOperationStatistics(samples, &UnrelatedUploadRenderReadDuration::renderDuration);
859 stats.read = calculateSingleOperationStatistics(samples, &UnrelatedUploadRenderReadDuration::readDuration);
860 stats.total = calculateSingleOperationStatistics(samples, &UnrelatedUploadRenderReadDuration::totalDuration);
865 static UploadRenderReadStatistics calculateSampleStatistics (const LineParametersWithConfidence& fit, const std::vector<RenderSampleResult<UploadRenderReadDuration> >& samples)
869 calculateBasicRenderStatistics(stats, fit, samples);
871 stats.upload = calculateSingleOperationStatistics(samples, &UploadRenderReadDuration::uploadDuration);
872 stats.render = calculateSingleOperationStatistics(samples, &UploadRenderReadDuration::renderDuration);
873 stats.read = calculateSingleOperationStatistics(samples, &UploadRenderReadDuration::readDuration);
874 stats.total = calculateSingleOperationStatistics(samples, &UploadRenderReadDuration::totalDuration);
879 static UploadRenderReadStatistics calculateSampleStatistics (const LineParametersWithConfidence& fit, const std::vector<RenderSampleResult<UploadRenderReadDurationWithUnrelatedUploadSize> >& samples)
883 calculateBasicRenderStatistics(stats, fit, samples);
885 stats.upload = calculateSingleOperationStatistics(samples, &UploadRenderReadDurationWithUnrelatedUploadSize::uploadDuration);
886 stats.render = calculateSingleOperationStatistics(samples, &UploadRenderReadDurationWithUnrelatedUploadSize::renderDuration);
887 stats.read = calculateSingleOperationStatistics(samples, &UploadRenderReadDurationWithUnrelatedUploadSize::readDuration);
888 stats.total = calculateSingleOperationStatistics(samples, &UploadRenderReadDurationWithUnrelatedUploadSize::totalDuration);
893 static RenderUploadRenderReadStatistics calculateSampleStatistics (const LineParametersWithConfidence& fit, const std::vector<RenderSampleResult<RenderUploadRenderReadDuration> >& samples)
897 calculateBasicRenderStatistics(stats, fit, samples);
899 stats.firstRender = calculateSingleOperationStatistics(samples, &RenderUploadRenderReadDuration::firstRenderDuration);
900 stats.upload = calculateSingleOperationStatistics(samples, &RenderUploadRenderReadDuration::uploadDuration);
901 stats.secondRender = calculateSingleOperationStatistics(samples, &RenderUploadRenderReadDuration::secondRenderDuration);
902 stats.read = calculateSingleOperationStatistics(samples, &RenderUploadRenderReadDuration::readDuration);
903 stats.total = calculateSingleOperationStatistics(samples, &RenderUploadRenderReadDuration::totalDuration);
909 static LineParametersWithConfidence fitLineToSamples (const std::vector<UploadSampleResult<DurationType> >& samples, int beginNdx, int endNdx, int step, deUint64 DurationType::*target = &DurationType::fitResponseDuration)
917 point.x() = (float)(samples[sampleNdx].writtenSize);
918 point.y() = (float)(samples[sampleNdx].duration.*target);
927 static LineParametersWithConfidence fitLineToSamples (const std::vector<RenderSampleResult<DurationType> >& samples, int beginNdx, int endNdx, int step, deUint64 DurationType::*target = &DurationType::fitResponseDuration)
935 point.x() = (float)(samples[sampleNdx].renderDataSize);
936 point.y() = (float)(samples[sampleNdx].duration.*target);
945 static LineParametersWithConfidence fitLineToSamples (const std::vector<T>& samples, int beginNdx, int endNdx, deUint64 T::SampleType::*target = &T::SampleType::fitResponseDuration)
947 return fitLineToSamples(samples, beginNdx, endNdx, 1, target);
951 static LineParametersWithConfidence fitLineToSamples (const std::vector<T>& samples, deUint64 T::SampleType::*target = &T::SampleType::fitResponseDuration)
953 return fitLineToSamples(samples, 0, (int)samples.size(), target);
995 static float calculateSampleFitLinearity (const std::vector<T>& samples, int T::*predictor)
997 // Compare the fitted line of first half of the samples to the fitted line of
998 // the second half of the samples. Calculate a AABB that fully contains every
1003 const int midPoint = (int)samples.size() / 2;
1004 const LineParametersWithConfidence startApproximation = fitLineToSamples(samples, 0, midPoint, &T::SampleType::fitResponseDuration);
1005 const LineParametersWithConfidence endApproximation = fitLineToSamples(samples, midPoint, (int)samples.size(), &T::SampleType::fitResponseDuration);
1007 const float aabbMinX = (float)(samples.front().*predictor);
1009 const float aabbMaxX = (float)(samples.back().*predictor);
1020 static float calculateSampleFitLinearity (const std::vector<UploadSampleResult<DurationType> >& samples)
1022 return calculateSampleFitLinearity(samples, &UploadSampleResult<DurationType>::writtenSize);
1026 static float calculateSampleFitLinearity (const std::vector<RenderSampleResult<DurationType> >& samples)
1028 return calculateSampleFitLinearity(samples, &RenderSampleResult<DurationType>::renderDataSize);
1032 static float calculateSampleTemporalStability (const std::vector<T>& samples, int T::*predictor)
1034 // Samples are sampled in the following order: 1) even samples (in random order) 2) odd samples (in random order)
1035 // Compare the fitted line of even samples to the fitted line of the odd samples. Calculate a AABB that fully
1040 const LineParametersWithConfidence evenApproximation = fitLineToSamples(samples, 0, (int)samples.size(), 2, &T::SampleType::fitResponseDuration);
1041 const LineParametersWithConfidence oddApproximation = fitLineToSamples(samples, 1, (int)samples.size(), 2, &T::SampleType::fitResponseDuration);
1043 const float aabbMinX = (float)(samples.front().*predictor);
1045 const float aabbMaxX = (float)(samples.back().*predictor);
1056 static float calculateSampleTemporalStability (const std::vector<UploadSampleResult<DurationType> >& samples)
1058 return calculateSampleTemporalStability(samples, &UploadSampleResult<DurationType>::writtenSize);
1062 static float calculateSampleTemporalStability (const std::vector<RenderSampleResult<DurationType> >& samples)
1064 return calculateSampleTemporalStability(samples, &RenderSampleResult<DurationType>::renderDataSize);
1068 static void bucketizeSamplesUniformly (const std::vector<UploadSampleResult<DurationType> >& samples, std::vector<UploadSampleResult<DurationType> >* buckets, int numBuckets, int& minBufferSize, int& maxBufferSize)
1073 for (int sampleNdx = 0; sampleNdx < (int)samples.size(); ++sampleNdx)
1075 DE_ASSERT(samples[sampleNdx].allocatedSize != 0);
1077 if (!minBufferSize || samples[sampleNdx].allocatedSize < minBufferSize)
1078 minBufferSize = samples[sampleNdx].allocatedSize;
1079 if (!maxBufferSize || samples[sampleNdx].allocatedSize > maxBufferSize)
1080 maxBufferSize = samples[sampleNdx].allocatedSize;
1083 for (int sampleNdx = 0; sampleNdx < (int)samples.size(); ++sampleNdx)
1085 const float bucketNdxFloat = (samples[sampleNdx].allocatedSize - minBufferSize) / (float)(maxBufferSize - minBufferSize) * numBuckets;
1088 buckets[bucketNdx].push_back(samples[sampleNdx]);
1178 static typename EnableIf<void, SampleTypeTraits<SampleType>::HAS_MAP_STATS>::Type logMapContribution (tcu::TestLog& log, const std::vector<UploadSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
1180 const LineParametersWithConfidence contributionFitting = fitLineToSamples(samples, &SampleType::mapDuration);
1187 static typename EnableIf<void, SampleTypeTraits<SampleType>::HAS_UNMAP_STATS>::Type logUnmapContribution (tcu::TestLog& log, const std::vector<UploadSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
1189 const LineParametersWithConfidence contributionFitting = fitLineToSamples(samples, &SampleType::unmapDuration);
1196 static typename EnableIf<void, SampleTypeTraits<SampleType>::HAS_WRITE_STATS>::Type logWriteContribution (tcu::TestLog& log, const std::vector<UploadSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
1198 const LineParametersWithConfidence contributionFitting = fitLineToSamples(samples, &SampleType::writeDuration);
1205 static typename EnableIf<void, SampleTypeTraits<SampleType>::HAS_FLUSH_STATS>::Type logFlushContribution (tcu::TestLog& log, const std::vector<UploadSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
1207 const LineParametersWithConfidence contributionFitting = fitLineToSamples(samples, &SampleType::flushDuration);
1214 static typename EnableIf<void, SampleTypeTraits<SampleType>::HAS_ALLOC_STATS>::Type logAllocContribution (tcu::TestLog& log, const std::vector<UploadSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
1216 const LineParametersWithConfidence contributionFitting = fitLineToSamples(samples, &SampleType::allocDuration);
1223 static typename EnableIf<void, SampleTypeTraits<SampleType>::HAS_RENDER_STATS>::Type logRenderContribution (tcu::TestLog& log, const std::vector<RenderSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
1225 const LineParametersWithConfidence contributionFitting = fitLineToSamples(samples, &SampleType::renderDuration);
1232 static typename EnableIf<void, SampleTypeTraits<SampleType>::HAS_READ_STATS>::Type logReadContribution (tcu::TestLog& log, const std::vector<RenderSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
1234 const LineParametersWithConfidence contributionFitting = fitLineToSamples(samples, &SampleType::readDuration);
1241 static typename EnableIf<void, SampleTypeTraits<SampleType>::HAS_UPLOAD_STATS>::Type logUploadContribution (tcu::TestLog& log, const std::vector<RenderSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
1243 const LineParametersWithConfidence contributionFitting = fitLineToSamples(samples, &SampleType::uploadDuration);
1250 static typename EnableIf<void, SampleTypeTraits<SampleType>::HAS_TOTAL_STATS>::Type logTotalContribution (tcu::TestLog& log, const std::vector<RenderSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
1252 const LineParametersWithConfidence contributionFitting = fitLineToSamples(samples, &SampleType::totalDuration);
1259 static typename EnableIf<void, SampleTypeTraits<SampleType>::HAS_FIRST_RENDER_STATS>::Type logFirstRenderContribution (tcu::TestLog& log, const std::vector<RenderSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
1261 const LineParametersWithConfidence contributionFitting = fitLineToSamples(samples, &SampleType::firstRenderDuration);
1268 static typename EnableIf<void, SampleTypeTraits<SampleType>::HAS_SECOND_RENDER_STATS>::Type logSecondRenderContribution (tcu::TestLog& log, const std::vector<RenderSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
1270 const LineParametersWithConfidence contributionFitting = fitLineToSamples(samples, &SampleType::secondRenderDuration);
1277 static typename EnableIf<void, Not<SampleTypeTraits<SampleType>::HAS_MAP_STATS>::Value>::Type logMapContribution (tcu::TestLog& log, const std::vector<UploadSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
1280 DE_UNREF(samples);
1285 static typename EnableIf<void, Not<SampleTypeTraits<SampleType>::HAS_UNMAP_STATS>::Value>::Type logUnmapContribution (tcu::TestLog& log, const std::vector<UploadSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
1288 DE_UNREF(samples);
1293 static typename EnableIf<void, Not<SampleTypeTraits<SampleType>::HAS_WRITE_STATS>::Value>::Type logWriteContribution (tcu::TestLog& log, const std::vector<UploadSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
1296 DE_UNREF(samples);
1301 static typename EnableIf<void, Not<SampleTypeTraits<SampleType>::HAS_FLUSH_STATS>::Value>::Type logFlushContribution (tcu::TestLog& log, const std::vector<UploadSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
1304 DE_UNREF(samples);
1309 static typename EnableIf<void, Not<SampleTypeTraits<SampleType>::HAS_ALLOC_STATS>::Value>::Type logAllocContribution (tcu::TestLog& log, const std::vector<UploadSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
1312 DE_UNREF(samples);
1317 static typename EnableIf<void, Not<SampleTypeTraits<SampleType>::HAS_RENDER_STATS>::Value>::Type logRenderContribution (tcu::TestLog& log, const std::vector<RenderSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
1320 DE_UNREF(samples);
1325 static typename EnableIf<void, Not<SampleTypeTraits<SampleType>::HAS_READ_STATS>::Value>::Type logReadContribution (tcu::TestLog& log, const std::vector<RenderSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
1328 DE_UNREF(samples);
1333 static typename EnableIf<void, Not<SampleTypeTraits<SampleType>::HAS_UPLOAD_STATS>::Value>::Type logUploadContribution (tcu::TestLog& log, const std::vector<RenderSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
1336 DE_UNREF(samples);
1341 static typename EnableIf<void, Not<SampleTypeTraits<SampleType>::HAS_TOTAL_STATS>::Value>::Type logTotalContribution (tcu::TestLog& log, const std::vector<RenderSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
1344 DE_UNREF(samples);
1349 static typename EnableIf<void, Not<SampleTypeTraits<SampleType>::HAS_FIRST_RENDER_STATS>::Value>::Type logFirstRenderContribution (tcu::TestLog& log, const std::vector<RenderSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
1352 DE_UNREF(samples);
1357 static typename EnableIf<void, Not<SampleTypeTraits<SampleType>::HAS_SECOND_RENDER_STATS>::Value>::Type logSecondRenderContribution (tcu::TestLog& log, const std::vector<RenderSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
1360 DE_UNREF(samples);
1364 void logSampleList (tcu::TestLog& log, const LineParametersWithConfidence& theilSenFitting, const std::vector<UploadSampleResult<SingleOperationDuration> >& samples)
1366 log << tcu::TestLog::SampleList("Samples", "Samples")
1374 for (int sampleNdx = 0; sampleNdx < (int)samples.size(); ++sampleNdx)
1376 const float fitResidual = samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * samples[sampleNdx].writtenSize);
1378 << samples[sampleNdx].writtenSize
1379 << samples[sampleNdx].bufferSize
1380 << (int)samples[sampleNdx].duration.totalDuration
1388 void logSampleList (tcu::TestLog& log, const LineParametersWithConfidence& theilSenFitting, const std::vector<UploadSampleResult<MapBufferRangeDuration> >& samples)
1390 log << tcu::TestLog::SampleList("Samples", "Samples")
1402 for (int sampleNdx = 0; sampleNdx < (int)samples.size(); ++sampleNdx)
1404 const float fitResidual = samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * samples[sampleNdx].writtenSize);
1406 << samples[sampleNdx].writtenSize
1407 << samples[sampleNdx].bufferSize
1408 << (int)samples[sampleNdx].duration.totalDuration
1409 << (int)samples[sampleNdx].duration.allocDuration
1410 << (int)samples[sampleNdx].duration.mapDuration
1411 << (int)samples[sampleNdx].duration.unmapDuration
1412 << (int)samples[sampleNdx].duration.writeDuration
1420 void logSampleList (tcu::TestLog& log, const LineParametersWithConfidence& theilSenFitting, const std::vector<UploadSampleResult<MapBufferRangeDurationNoAlloc> >& samples)
1422 log << tcu::TestLog::SampleList("Samples", "Samples")
1433 for (int sampleNdx = 0; sampleNdx < (int)samples.size(); ++sampleNdx)
1435 const float fitResidual = samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * samples[sampleNdx].writtenSize);
1437 << samples[sampleNdx].writtenSize
1438 << samples[sampleNdx].bufferSize
1439 << (int)samples[sampleNdx].duration.totalDuration
1440 << (int)samples[sampleNdx].duration.mapDuration
1441 << (int)samples[sampleNdx].duration.unmapDuration
1442 << (int)samples[sampleNdx].duration.writeDuration
1450 void logSampleList (tcu::TestLog& log, const LineParametersWithConfidence& theilSenFitting, const std::vector<UploadSampleResult<MapBufferRangeFlushDuration> >& samples)
1452 log << tcu::TestLog::SampleList("Samples", "Samples")
1465 for (int sampleNdx = 0; sampleNdx < (int)samples.size(); ++sampleNdx)
1467 const float fitResidual = samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * samples[sampleNdx].writtenSize);
1469 << samples[sampleNdx].writtenSize
1470 << samples[sampleNdx].bufferSize
1471 << (int)samples[sampleNdx].duration.totalDuration
1472 << (int)samples[sampleNdx].duration.allocDuration
1473 << (int)samples[sampleNdx].duration.mapDuration
1474 << (int)samples[sampleNdx].duration.unmapDuration
1475 << (int)samples[sampleNdx].duration.writeDuration
1476 << (int)samples[sampleNdx].duration.flushDuration
1484 void logSampleList (tcu::TestLog& log, const LineParametersWithConfidence& theilSenFitting, const std::vector<UploadSampleResult<MapBufferRangeFlushDurationNoAlloc> >& samples)
1486 log << tcu::TestLog::SampleList("Samples", "Samples")
1498 for (int sampleNdx = 0; sampleNdx < (int)samples.size(); ++sampleNdx)
1500 const float fitResidual = samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * samples[sampleNdx].writtenSize);
1502 << samples[sampleNdx].writtenSize
1503 << samples[sampleNdx].bufferSize
1504 << (int)samples[sampleNdx].duration.totalDuration
1505 << (int)samples[sampleNdx].duration.mapDuration
1506 << (int)samples[sampleNdx].duration.unmapDuration
1507 << (int)samples[sampleNdx].duration.writeDuration
1508 << (int)samples[sampleNdx].duration.flushDuration
1516 void logSampleList (tcu::TestLog& log, const LineParametersWithConfidence& theilSenFitting, const std::vector<RenderSampleResult<RenderReadDuration> >& samples)
1518 log << tcu::TestLog::SampleList("Samples", "Samples")
1528 for (int sampleNdx = 0; sampleNdx < (int)samples.size(); ++sampleNdx)
1530 const float fitResidual = samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * samples[sampleNdx].renderDataSize);
1532 << samples[sampleNdx].renderDataSize
1533 << samples[sampleNdx].numVertices
1534 << (int)samples[sampleNdx].duration.renderReadDuration
1535 << (int)samples[sampleNdx].duration.renderDuration
1536 << (int)samples[sampleNdx].duration.readDuration
1544 void logSampleList (tcu::TestLog& log, const LineParametersWithConfidence& theilSenFitting, const std::vector<RenderSampleResult<UnrelatedUploadRenderReadDuration> >& samples)
1546 log << tcu::TestLog::SampleList("Samples", "Samples")
1557 for (int sampleNdx = 0; sampleNdx < (int)samples.size(); ++sampleNdx)
1559 const float fitResidual = samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * samples[sampleNdx].renderDataSize);
1561 << samples[sampleNdx].renderDataSize
1562 << samples[sampleNdx].numVertices
1563 << samples[sampleNdx].unrelatedDataSize
1564 << (int)samples[sampleNdx].duration.renderReadDuration
1565 << (int)samples[sampleNdx].duration.renderDuration
1566 << (int)samples[sampleNdx].duration.readDuration
1574 void logSampleList (tcu::TestLog& log, const LineParametersWithConfidence& theilSenFitting, const std::vector<RenderSampleResult<UploadRenderReadDuration> >& samples)
1576 log << tcu::TestLog::SampleList("Samples", "Samples")
1589 for (int sampleNdx = 0; sampleNdx < (int)samples.size(); ++sampleNdx)
1591 const float fitResidual = samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * samples[sampleNdx].renderDataSize);
1593 << samples[sampleNdx].renderDataSize
1594 << samples[sampleNdx].uploadedDataSize
1595 << samples[sampleNdx].numVertices
1596 << (int)samples[sampleNdx].duration.renderReadDuration
1597 << (int)samples[sampleNdx].duration.totalDuration
1598 << (int)samples[sampleNdx].duration.uploadDuration
1599 << (int)samples[sampleNdx].duration.renderDuration
1600 << (int)samples[sampleNdx].duration.readDuration
1608 void logSampleList (tcu::TestLog& log, const LineParametersWithConfidence& theilSenFitting, const std::vector<RenderSampleResult<UploadRenderReadDurationWithUnrelatedUploadSize> >& samples)
1610 log << tcu::TestLog::SampleList("Samples", "Samples")
1624 for (int sampleNdx = 0; sampleNdx < (int)samples.size(); ++sampleNdx)
1626 const float fitResidual = samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * samples[sampleNdx].renderDataSize);
1628 << samples[sampleNdx].renderDataSize
1629 << samples[sampleNdx].uploadedDataSize
1630 << samples[sampleNdx].numVertices
1631 << samples[sampleNdx].unrelatedDataSize
1632 << (int)samples[sampleNdx].duration.renderReadDuration
1633 << (int)samples[sampleNdx].duration.totalDuration
1634 << (int)samples[sampleNdx].duration.uploadDuration
1635 << (int)samples[sampleNdx].duration.renderDuration
1636 << (int)samples[sampleNdx].duration.readDuration
1644 void logSampleList (tcu::TestLog& log, const LineParametersWithConfidence& theilSenFitting, const std::vector<RenderSampleResult<RenderUploadRenderReadDuration> >& samples)
1646 log << tcu::TestLog::SampleList("Samples", "Samples")
1660 for (int sampleNdx = 0; sampleNdx < (int)samples.size(); ++sampleNdx)
1662 const float fitResidual = samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * samples[sampleNdx].renderDataSize);
1664 << samples[sampleNdx].renderDataSize
1665 << samples[sampleNdx].uploadedDataSize
1666 << samples[sampleNdx].numVertices
1667 << (int)samples[sampleNdx].duration.renderReadDuration
1668 << (int)samples[sampleNdx].duration.totalDuration
1669 << (int)samples[sampleNdx].duration.firstRenderDuration
1670 << (int)samples[sampleNdx].duration.uploadDuration
1671 << (int)samples[sampleNdx].duration.secondRenderDuration
1672 << (int)samples[sampleNdx].duration.readDuration
1681 static UploadSampleAnalyzeResult analyzeSampleResults (tcu::TestLog& log, const std::vector<UploadSampleResult<SampleType> >& samples, bool logBucketPerformance)
1684 const LineParametersWithConfidence theilSenFitting = fitLineToSamples(samples);
1685 const typename SampleTypeTraits<SampleType>::StatsType resultStats = calculateSampleStatistics(theilSenFitting, samples);
1689 // Output raw samples
1691 const tcu::ScopedLogSection section(log, "Samples", "Samples");
1692 logSampleList(log, theilSenFitting, samples);
1703 bucketizeSamplesUniformly(samples, &buckets[0], numBuckets, minBufferSize, maxBufferSize);
1743 logMapContribution(log, samples, resultStats);
1744 logUnmapContribution(log, samples, resultStats);
1745 logWriteContribution(log, samples, resultStats);
1746 logFlushContribution(log, samples, resultStats);
1747 logAllocContribution(log, samples, resultStats);
1754 const int medianBufferSize = (samples.front().bufferSize + samples.back().bufferSize) / 2;
1757 const float sampleLinearity = calculateSampleFitLinearity(samples);
1758 const float sampleTemporalStability = calculateSampleTemporalStability(samples);
1790 static RenderSampleAnalyzeResult analyzeSampleResults (tcu::TestLog& log, const std::vector<RenderSampleResult<SampleType> >& samples)
1793 const LineParametersWithConfidence theilSenFitting = fitLineToSamples(samples);
1794 const typename SampleTypeTraits<SampleType>::StatsType resultStats = calculateSampleStatistics(theilSenFitting, samples);
1798 // output raw samples
1800 const tcu::ScopedLogSection section(log, "Samples", "Samples");
1801 logSampleList(log, theilSenFitting, samples);
1809 logFirstRenderContribution(log, samples, resultStats);
1810 logUploadContribution(log, samples, resultStats);
1811 logRenderContribution(log, samples, resultStats);
1812 logSecondRenderContribution(log, samples, resultStats);
1813 logReadContribution(log, samples, resultStats);
1814 logTotalContribution(log, samples, resultStats);
1821 const int medianDataSize = (samples.front().renderDataSize + samples.back().renderDataSize) / 2;
1824 const float sampleLinearity = calculateSampleFitLinearity(samples);
1825 const float sampleTemporalStability = calculateSampleTemporalStability(samples);
1866 // (first run and later run samples differ significantly?)
2015 // make sure the first samples too have some buffers removed
2141 // Retry failed samples
2283 << "Testing performance with " << m_numSamples << " test samples. Sample order is randomized. All samples at even positions (first = 0) are tested before samples at odd positions.\n"
2321 m_testCtx.getLog() << tcu::TestLog::Message << "Test result is the median transfer rate of the test samples." << tcu::TestLog::EndMessage;
2390 // upload something else first, this should reduce noise in samples
2483 // with small buffers, report the median transfer rate of the samples
3226 << "Testing performance with " << (int)NUM_SAMPLES << " test samples. Sample order is randomized. All samples at even positions (first = 0) are tested before samples at odd positions.\n"
3234 << "Test result is the median transfer rate of the test samples.\n"
3359 // Return median transfer rate of the samples
4322 << getNumSamples() << " test samples. Sample order is randomized.\n"
4323 << "All samples at even positions (first = 0) are tested before samples at odd positions.\n"
4448 << getNumSamples() << " test samples. Sample order is randomized.\n"
4449 << "All samples at even positions (first = 0) are tested before samples at odd positions.\n"
4620 << "Measuring the time used in a single readPixels call with " << m_numSamples << " test samples.\n"
4621 << "Test result is the median of the samples in microseconds.\n"
4663 << tcu::TestLog::SampleList("Samples", "Samples")
4691 << "60 % of samples within range:\n"
4798 << RenderCase<SampleType>::getNumSamples() << " test samples. Sample order is randomized.\n"
4799 << "All samples at even positions (first = 0) are tested before samples at odd positions.\n"
5139 << getNumSamples() << " test samples. Sample order is randomized.\n"
5140 << "All samples at even positions (first = 0) are tested before samples at odd positions.\n"
5615 << ((m_bufferState == BUFFERSTATE_EXISTING) ? ("All test samples use the same buffer object.\n") : (""))
5645 const int betweenIterationDummyFrameCount = 5; // draw misc between test samples
5889 const tcu::ScopedLogSection section(m_testCtx.getLog(), "Samples", "Result samples");
5916 m_testCtx.getLog() << tcu::TestLog::Message << "Warning! Time samples do not seem to be temporally stable, sample times seem to drift to one direction during test execution." << tcu::TestLog::EndMessage;
5952 // Log samples
5955 << tcu::TestLog::SampleList("Samples", "Samples")
6111 // Last two samples are not equal? Samples never stabilized
6116 << description << ": Samples with swap count " << sampleNdx << " and " << cmpTargetDistribution << " do not seem to have the same distribution:\n"
6127 << description << ": Samples with swap count " << sampleNdx << " and " << cmpTargetDistribution << " do not seem to have the same distribution:\n"
6142 << description << ": All samples seem to have the same distribution"
6722 // Don't log unrelated buffer information to samples if there is no such buffer