Ocean
TestIOMaps.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 FACEBOOK_OCEAN_TEST_TESTIO_TESTMAPS_TEST_IO_MAPS_H
9 #define FACEBOOK_OCEAN_TEST_TESTIO_TESTMAPS_TEST_IO_MAPS_H
10 
12 
13 #include "ocean/base/Worker.h"
14 
15 namespace Ocean
16 {
17 
18 namespace Test
19 {
20 
21 namespace TestIO
22 {
23 
24 namespace TestMaps
25 {
26 
27 /**
28  * @ingroup testio
29  * @defgroup testiomaps Ocean Test IO Maps Library
30  * @{
31  * The Ocean Test IO Maps Library provides several functions to test the performance and validation of the maps functionalities.
32  * The library is platform independent.
33  * @}
34  */
35 
36 /**
37  * @namespace Ocean::Test::TestIO::TestMaps Namespace of the IO Maps Test library.<p>
38  * The Namespace Ocean::Test::TestIO::TestMaps is used in the entire Ocean IO Maps Test Library.
39  */
40 
41 // Defines OCEAN_TEST_IO_MAPS_EXPORT for dll export and import.
42 #if defined(_WINDOWS) && defined(OCEAN_RUNTIME_SHARED)
43  #ifdef USE_OCEAN_TEST_IO_MAPS_EXPORT
44  #define OCEAN_TEST_IO_MAPS_EXPORT __declspec(dllexport)
45  #else
46  #define OCEAN_TEST_IO_MAPS_EXPORT __declspec(dllimport)
47  #endif
48 #else
49  #define OCEAN_TEST_IO_MAPS_EXPORT
50 #endif
51 
52 /**
53  * Tests the entire IO Maps library.
54  * @param testDuration Number of seconds for each test, with range (0, infinity)
55  * @param worker The worker object to distribute some computation on as many CPU cores as defined in the worker object.
56  * @param testFunctions Optional name of the functions to be tested
57  * @return True, if the entire test succeeded
58  * @ingroup testiomaps
59  */
60 OCEAN_TEST_IO_MAPS_EXPORT bool testIOMaps(const double testDuration, Worker& worker, const std::string& testFunctions = std::string());
61 
62 /**
63  * Tests the entire IO maps library.
64  * This function returns directly as the actual test is invoked in an own thread.<br>
65  * Use this function in intendet for non-console applications like e.g., mobile devices.
66  * @param testDuration Number of seconds for each test, with range (0, infinity)
67  * @param testFunctions Optional name of the functions to be tested
68  * @ingroup testiomaps
69  */
70 OCEAN_TEST_IO_MAPS_EXPORT void testIOMapsAsynchron(const double testDuration, const std::string& testFunctions = std::string());
71 
72 }
73 
74 }
75 
76 }
77 
78 }
79 
80 #endif // FACEBOOK_OCEAN_TEST_TESTCV_TESTDETECTOR_TESTCVDETECTOR_H
This class implements a worker able to distribute function calls over different threads.
Definition: Worker.h:33
OCEAN_TEST_IO_MAPS_EXPORT bool testIOMaps(const double testDuration, Worker &worker, const std::string &testFunctions=std::string())
Tests the entire IO Maps library.
OCEAN_TEST_IO_MAPS_EXPORT void testIOMapsAsynchron(const double testDuration, const std::string &testFunctions=std::string())
Tests the entire IO maps library.
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15