Ocean
Loading...
Searching...
No Matches
TestMemory.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#ifndef META_OCEAN_TEST_TESTBASE_TEST_MEMORY_H
9#define META_OCEAN_TEST_TESTBASE_TEST_MEMORY_H
10
13
14#include "ocean/base/Worker.h"
15
18
19namespace Ocean
20{
21
22namespace Test
23{
24
25namespace TestBase
26{
27
28/**
29 * This class implements a memory test.
30 * @ingroup testbase
31 */
32class OCEAN_TEST_BASE_EXPORT TestMemory
33{
34 public:
35
36 /**
37 * Tests some memory functions.
38 * @param testDuration Number of seconds for each test, with range (0, infinity)
39 * @param worker The worker object to distribute the computation
40 * @param selector The selector to filter individual test cases
41 * @return True, if succeeded
42 */
43 static bool test(const double testDuration, Worker& worker, const TestSelector& selector = TestSelector());
44
45 /**
46 * Tests the memory object.
47 * @param testDuration Number of seconds for each test, with range (0, infinity)
48 * @return True, if succeeded
49 */
50 static bool testObject(const double testDuration);
51
52 /**
53 * Tests the memory allocation performance.
54 * @param testDuration Number of seconds for each test, with range (0, infinity)
55 * @param worker The worker object to distribute the computation
56 * @return True, if succeeded
57 */
58 static bool testAllocation(const double testDuration, Worker& worker);
59
60 /**
61 * Tests the isInside functions.
62 * @param testDuration Number of seconds for each test, with range (0, infinity)
63 * @return True, if succeeded
64 */
65 static bool testIsInside(const double testDuration);
66};
67
68}
69
70}
71
72}
73
74#endif // META_OCEAN_TEST_TESTBASE_TEST_MEMORY_H
This class implements a memory test.
Definition TestMemory.h:33
static bool testObject(const double testDuration)
Tests the memory object.
static bool testIsInside(const double testDuration)
Tests the isInside functions.
static bool test(const double testDuration, Worker &worker, const TestSelector &selector=TestSelector())
Tests some memory functions.
static bool testAllocation(const double testDuration, Worker &worker)
Tests the memory allocation performance.
This class implements a test selector that parses test function strings and determines which tests sh...
Definition TestSelector.h:51
This class implements a worker able to distribute function calls over different threads.
Definition Worker.h:33
The namespace covering the entire Ocean framework.
Definition Accessor.h:15