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
//
// Copyright 2015 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.
//
// IndexDataManagerPerfTest:
// Performance test for index buffer management.
//
#include "ANGLEPerfTest.h"
#include <gmock/gmock.h>
#include "common/bitset_utils.h"
using namespace testing;
namespace
{
template <typename T>
class BitSetIteratorPerfTest : public ANGLEPerfTest
{
public:
BitSetIteratorPerfTest();
void step() override;
T mBits;
};
template <typename T>
BitSetIteratorPerfTest<T>::BitSetIteratorPerfTest()
: ANGLEPerfTest("BitSetIteratorPerf", "", "_run", 1)
{}
template <typename T>
void BitSetIteratorPerfTest<T>::step()
{
mBits.flip();
for (size_t bit : mBits)
{
ANGLE_UNUSED_VARIABLE(bit);
}
mBits.reset();
}
// These type names unfortunately don't get printed correctly in Gtest.
#if defined(ANGLE_IS_64_BIT_CPU)
using TestTypes = Types<angle::IterableBitSet<32>, angle::BitSet32<32>, angle::BitSet64<32>>;
#else
using TestTypes = Types<angle::IterableBitSet<32>, angle::BitSet32<32>>;
#endif // defined(ANGLE_IS_64_BIT_CPU)
TYPED_TEST_SUITE(BitSetIteratorPerfTest, TestTypes);
TYPED_TEST(BitSetIteratorPerfTest, Run)
{
this->run();
}
} // anonymous namespace