Hash :
2f4a7518
Author :
Date :
2019-08-16T14:09:13
Refactor perf tests to fix metric/story swapping Refactors the perf tests to fix the issue of metric and story being swapped, which causes issues when trying to convert to histograms. Specifically, does the following: 1. Rolls the version of src/tests/perf_tests/third_party/perf/ to Chromium 476dae823269c8d05b544271af97ad1adb0db8ee 2. Switch to using PerfResultReporter instead of PrintResult directly. 3. Split RenderTestParams::suffix into backend and story; backend is used as part of the metric, while story is used as the story. 4. Remove the "average" metric that was being automatically reported by ANGLEPerfTest, as reported results are automatically averaged. 5. Update the reported metric to more clearly distinguish between test, backend, and metric. It is now name_backend.metric. e.g. DrawCallPerf_vulkan.wall_time. Bug: chromium:923564,chromium:924618 Change-Id: I00cc191407052f23df57dbfa53b6fb088fc26960 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1762360 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
//
// Copyright 2017 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// DrawCallPerfParams.cpp:
// Parametrization for performance tests for ANGLE draw call overhead.
//
#include "DrawCallPerfParams.h"
#include <sstream>
DrawCallPerfParams::DrawCallPerfParams()
{
majorVersion = 2;
minorVersion = 0;
windowWidth = 64;
windowHeight = 64;
// Lower the iteration count in debug.
#if !defined(NDEBUG)
iterationsPerStep = 100;
#else
iterationsPerStep = 20000;
#endif
runTimeSeconds = 10.0;
numTris = 1;
offscreen = false;
}
DrawCallPerfParams::~DrawCallPerfParams() = default;
std::string DrawCallPerfParams::story() const
{
std::stringstream strstr;
strstr << RenderTestParams::story();
if (numTris == 0)
{
strstr << "_validation_only";
}
if (offscreen)
{
strstr << "_offscreen";
}
return strstr.str();
}
using namespace angle::egl_platform;
namespace params
{
DrawCallPerfParams DrawCallD3D11()
{
DrawCallPerfParams params;
params.eglParameters = D3D11();
return params;
}
DrawCallPerfParams DrawCallD3D9()
{
DrawCallPerfParams params;
params.eglParameters = D3D9();
return params;
}
DrawCallPerfParams DrawCallOpenGL()
{
DrawCallPerfParams params;
params.eglParameters = OPENGL_OR_GLES();
return params;
}
DrawCallPerfParams DrawCallValidation()
{
DrawCallPerfParams params;
params.eglParameters = DEFAULT();
params.numTris = 0;
params.runTimeSeconds = 5.0;
return params;
}
DrawCallPerfParams DrawCallVulkan()
{
DrawCallPerfParams params;
params.eglParameters = VULKAN();
return params;
}
DrawCallPerfParams DrawCallWGL()
{
DrawCallPerfParams params;
params.driver = angle::GLESDriverType::SystemWGL;
return params;
}
} // namespace params