MCPcopy Create free account
hub / github.com/comaps/comaps / GenerateSizes

Function GenerateSizes

libs/drape/drape_tests/vertex_buffer_tests.cpp:15–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13{
14#ifndef DEBUG
15std::vector<uint32_t> GenerateSizes(uint32_t min, uint32_t max)
16{
17 std::vector<uint32_t> res;
18
19 std::uniform_int_distribution<uint64_t> randDist(min, max);
20 std::random_device randDevice;
21 std::mt19937 randEngine(randDevice());
22
23 for (size_t i = 0; i < 1000000; ++i)
24 res.push_back(randDist(randEngine));
25
26 return res;
27}
28
29UNIT_TEST(VertexBuffer_Benchmark)
30{

Callers 1

UNIT_TESTFunction · 0.85

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected