Path: blob/main_old/src/tests/perf_tests/BitSetIteratorPerf.cpp
1693 views
//1// Copyright 2015 The ANGLE Project Authors. All rights reserved.2// Use of this source code is governed by a BSD-style license that can be3// found in the LICENSE file.4//5// IndexDataManagerPerfTest:6// Performance test for index buffer management.7//89#include "ANGLEPerfTest.h"1011#include <gmock/gmock.h>1213#include "common/bitset_utils.h"1415using namespace testing;1617namespace18{1920template <typename T>21class BitSetIteratorPerfTest : public ANGLEPerfTest22{23public:24BitSetIteratorPerfTest();2526void step() override;2728T mBits;29};3031template <typename T>32BitSetIteratorPerfTest<T>::BitSetIteratorPerfTest()33: ANGLEPerfTest("BitSetIteratorPerf", "", "_run", 1)34{}3536template <typename T>37void BitSetIteratorPerfTest<T>::step()38{39mBits.flip();4041for (size_t bit : mBits)42{43ANGLE_UNUSED_VARIABLE(bit);44}4546mBits.reset();47}4849// These type names unfortunately don't get printed correctly in Gtest.50using TestTypes = Types<angle::BitSet32<32>,51angle::BitSet64<32>,52angle::BitSet64<64>,53angle::BitSet<96>,54angle::BitSetArray<96>>;55TYPED_TEST_SUITE(BitSetIteratorPerfTest, TestTypes);5657TYPED_TEST(BitSetIteratorPerfTest, Run)58{59this->run();60}6162} // anonymous namespace636465