/* * Copyright (c) Contributors to the Open 3D Engine Project. * For complete copyright and license terms please see the LICENSE at the root of this distribution. * * SPDX-License-Identifier: Apache-2.0 OR MIT * */ #pragma once #include #include #include #include #include #include #include #include #include #include #include namespace UnitTest { AZ_TYPE_SAFE_INTEGRAL(StringHash, size_t); static constexpr int SmallIterationCount = 10; static constexpr int MediumIterationCount = 1000; static constexpr int LargeIterationCount = 100000; static constexpr AZ::u32 ProfilerProxyGroup = AZ_CRC_CE("StatisticalProfilerProxyTests"); template StatIdType ConvertNameToStatId(const AZStd::string& name); template<> inline AZStd::string ConvertNameToStatId(const AZStd::string& name) { return name; } template<> inline StringHash ConvertNameToStatId(const AZStd::string& name) { AZStd::hash hasher; return StringHash(hasher(name)); } template<> inline AZ::Crc32 ConvertNameToStatId(const AZStd::string& name) { return AZ::Crc32(name); } template<> inline AZ::HashValue32 ConvertNameToStatId(const AZStd::string& name) { return AZ::TypeHash32(name.c_str()); } template<> inline AZ::HashValue64 ConvertNameToStatId(const AZStd::string& name) { return AZ::TypeHash64(name.c_str()); } }//namespace UnitTest