+
+
+ IdType cubos:: engine:: AnyAsset::getIdType () const
+
+
Gets the type of the asset identifier.
+
+
+
+ Returns
+ Asset identifier type.
+
+
+
+
+
+
+ std::string cubos:: engine:: AnyAsset:: getIdString () const
+
+
Gets the Path or UUID of the asset.
+
+
+
+ Returns
+ Asset Path or UUID.
+
+
+
+
+
- uuids::uuid cubos:: engine:: AnyAsset:: getId () const
+ std::optional<uuids::uuid> cubos:: engine:: AnyAsset:: getId () const
-
Gets the UUID of the asset.
+
Gets the UUID of the asset if it has one.
+
There are two possible reasons for an asset handle to have no UUID:
it being an invalid or null handle; it being created from an asset path. To ensure an asset handle gets a UUID, you can use Assets:: load .
diff --git a/preview/pr-1282/classcubos_1_1engine_1_1AssetMeta.html b/preview/pr-1282/classcubos_1_1engine_1_1AssetMeta.html
index 04850c299..820d79703 100644
--- a/preview/pr-1282/classcubos_1_1engine_1_1AssetMeta.html
+++ b/preview/pr-1282/classcubos_1_1engine_1_1AssetMeta.html
@@ -79,6 +79,14 @@
auto get ( std::string_view key) const -> std::optional<std::string>
Gets the value of a parameter on the asset's metadata.
+
+ auto getId ( ) const -> uuids::uuid
+
+ Gets the ID of the asset.
+
+ auto getPath ( ) const -> std::optional<std::string>
+
+ Gets the path of the asset.
void set ( std::string_view key,
std::string_view value)
@@ -123,6 +131,34 @@
+
+
+ uuids::uuid cubos:: engine:: AssetMeta:: getId () const
+
+
Gets the ID of the asset.
+
+
+
+ Returns
+ ID of the asset.
+
+
+
+
+
+
+ std::optional<std::string> cubos:: engine:: AssetMeta:: getPath () const
+
+
Gets the path of the asset.
+
+
+
+ Returns
+ Path of the asset.
+
+
+
+
void cubos:: engine:: AssetMeta:: set (std::string_view key,
diff --git a/preview/pr-1282/classcubos_1_1engine_1_1Assets.html b/preview/pr-1282/classcubos_1_1engine_1_1Assets.html
index df45c01db..fd3a8bf8a 100644
--- a/preview/pr-1282/classcubos_1_1engine_1_1Assets.html
+++ b/preview/pr-1282/classcubos_1_1engine_1_1Assets.html
@@ -110,6 +110,10 @@
void loadMeta ( std::string_view path)
Loads all metadata from the virtual filesystem, in the given path. If the path points to a directory, it will be recursively searched for metadata files.
+
+ void unloadMeta ( std::string_view path)
+
+ Unloads all asset metadata from assets within the given path.
auto load ( AnyAsset handle) const -> AnyAsset
@@ -313,6 +317,24 @@
+
+
+ void cubos:: engine:: Assets:: unloadMeta (std::string_view path)
+
+
Unloads all asset metadata from assets within the given path.
+
+
+ Parameters
+
+
+
+ path
+ Path to unload metadata from.
+
+
+
+
If an asset from the given path is currently loaded, it will not be unloaded, but it will be dissociated from its original metadata path.
+
AnyAsset cubos:: engine:: Assets::load (AnyAsset handle) const
diff --git a/preview/pr-1282/classtesseratos_1_1ProjectManager.html b/preview/pr-1282/classtesseratos_1_1ProjectManager.html
new file mode 100644
index 000000000..fc7a33020
--- /dev/null
+++ b/preview/pr-1282/classtesseratos_1_1ProjectManager.html
@@ -0,0 +1,240 @@
+
+
+
+
+ tesseratos::ProjectManager class | Cubos Docs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
System argument which can be used to manage the currently loaded project.
+
+ Contents
+
+
+
+
+
+
+
+ auto open ( std::string projectOSPath,
+ std::string binaryOSPath) -> bool
+
+ Opens a project directory.
+
+ auto open ( ) const -> bool
+
+ Checks whether a project is currently open.
+
+ void close ( )
+
+ Closes the currently open project.
+
+ auto launch ( ) -> bool
+
+ Launches the project's binary and attaches the debugger.
+
+ void terminate ( )
+
+ Stops the project's binary.
+
+
+
+ Function documentation
+
+
+
Constructs.
+
+
+ Parameters
+
+
+
+ state
+ State of the project manager.
+
+
+ assets
+ Asset manager.
+
+
+ debugger
+ Debugger .
+
+
+
+
+
+
+ bool tesseratos:: ProjectManager:: open (std::string projectOSPath,
+ std::string binaryOSPath)
+
+
Opens a project directory.
+
+
+ Parameters
+
+
+
+ projectOSPath
+ Project's directory path in the operating system.
+
+
+ binaryOSPath
+ Project's binary directory path in the operating system.
+
+
+
+
+ Returns
+ Whether the project could be opened successfully.
+
+
+
+
The given project directory is mounted in the /project directory in the virtual file system. Unmounts any previously opened project directory.
+
+
+
+ bool tesseratos:: ProjectManager:: open () const
+
+
Checks whether a project is currently open.
+
+
+
+ Returns
+ Whether a project is currently open.
+
+
+
+
+
+
+ bool tesseratos:: ProjectManager:: launch ()
+
+
Launches the project's binary and attaches the debugger.
+
+
+
+ Returns
+ Whether the project could be launched successfully.
+
+
+
+
If the binary is already running, it is stopped first.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Unlike everything else in the docs, the search functionality requires JavaScript.
+
+
Search for symbols, directories, files, pages or
+ modules. You can omit any prefix from the symbol or file path; adding a
+ :
or /
suffix lists all members of given symbol or
+ directory.
+
Use ↓
+ / ↑ to navigate through the list,
+ Enter to go.
+ Tab autocompletes common prefix, you can
+ copy a link to the result using ⌘
+ L while ⌘
+ M produces a Markdown link.
+
+
Sorry, nothing was found.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/preview/pr-1282/dir_66ee469e7479b8bd292626243a0daea9.html b/preview/pr-1282/dir_66ee469e7479b8bd292626243a0daea9.html
index d8d91f2f0..b549a592d 100644
--- a/preview/pr-1282/dir_66ee469e7479b8bd292626243a0daea9.html
+++ b/preview/pr-1282/dir_66ee469e7479b8bd292626243a0daea9.html
@@ -69,6 +69,8 @@
Debugger plugin directory.
directory importer /
Asset explorer plugin directory.
+ directory project /
+ Project plugin directory.
directory scene_editor /
Scene editor plugin directory.
directory voxel_palette_editor /
diff --git a/preview/pr-1282/dir_6c897dd97bedf3914ee8a4d9f7f6549c.html b/preview/pr-1282/dir_6c897dd97bedf3914ee8a4d9f7f6549c.html
index 4d122e626..ba7c91127 100644
--- a/preview/pr-1282/dir_6c897dd97bedf3914ee8a4d9f7f6549c.html
+++ b/preview/pr-1282/dir_6c897dd97bedf3914ee8a4d9f7f6549c.html
@@ -89,10 +89,6 @@
file api.hpp
Macro CUBOS_ CORE_ API .
- file log.hpp
- Logging and assertion macros.
- file metrics.hpp
- Metrics and profiling utilities and macros.
diff --git a/preview/pr-1282/dir_98bd0872c878d6fa2d8a66c2174847b1.html b/preview/pr-1282/dir_98bd0872c878d6fa2d8a66c2174847b1.html
new file mode 100644
index 000000000..a8e11130a
--- /dev/null
+++ b/preview/pr-1282/dir_98bd0872c878d6fa2d8a66c2174847b1.html
@@ -0,0 +1,122 @@
+
+
+
+
+ tesseratos/project/ directory | Cubos Docs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Unlike everything else in the docs, the search functionality requires JavaScript.
+
+
Search for symbols, directories, files, pages or
+ modules. You can omit any prefix from the symbol or file path; adding a
+ :
or /
suffix lists all members of given symbol or
+ directory.
+
Use ↓
+ / ↑ to navigate through the list,
+ Enter to go.
+ Tab autocompletes common prefix, you can
+ copy a link to the result using ⌘
+ L while ⌘
+ M produces a Markdown link.
+
+
Sorry, nothing was found.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/preview/pr-1282/dir_b3628534f645523dfa2d021cded97bf6.html b/preview/pr-1282/dir_b3628534f645523dfa2d021cded97bf6.html
index 86fc6d72e..dd7429ef2 100644
--- a/preview/pr-1282/dir_b3628534f645523dfa2d021cded97bf6.html
+++ b/preview/pr-1282/dir_b3628534f645523dfa2d021cded97bf6.html
@@ -65,6 +65,8 @@
file pool.hpp
Class cubos:: core:: thread:: ThreadPool .
+ file process.hpp
+ Class cubos:: core:: thread:: Process .
file task.hpp
Class cubos:: core:: thread:: Task .
diff --git a/preview/pr-1282/dir_f6f65ff657bd34b22e5078310628f4e7.html b/preview/pr-1282/dir_f6f65ff657bd34b22e5078310628f4e7.html
index 26de9063d..df917884b 100644
--- a/preview/pr-1282/dir_f6f65ff657bd34b22e5078310628f4e7.html
+++ b/preview/pr-1282/dir_f6f65ff657bd34b22e5078310628f4e7.html
@@ -63,8 +63,8 @@ Contents
diff --git a/preview/pr-1282/examples-core-metrics.html b/preview/pr-1282/examples-core-metrics.html
deleted file mode 100644
index 8d5e9908c..000000000
--- a/preview/pr-1282/examples-core-metrics.html
+++ /dev/null
@@ -1,155 +0,0 @@
-
-
-
-
- Examples » Core » Metrics | Cubos Docs
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Using the metrics system.
-
See also Full source code here .
Registering metrics and profiling in Cubos can be done through the metric macros defined in core/ metrics.hpp and the core::Metrics class. In order to enable these features, compile with -DENABLE_PROFILING
.
#include <cubos/core/metrics.hpp>
-
-using cubos :: core :: Metrics ; The following example demonstrates a simple usage of the core::Metrics class, simulating a random function that takes X milliseconds to finish, where X is randomly generated, and also registering metrics values.
This is the main loop:
const int numFrames = 10 ;
- for ( int i = 0 ; i < numFrames ; ++ i )
- {
- // simulate frame by calling a function that does work..
- simulateFrame ( randomMs ( 0 , 500 ));
-
- // register some metrics, this could be FPS, entities count, ....
- CUBOS_METRIC ( "i" , i );
- } Which calls these utility functions:
static void simulateFrame ( int ms )
-{
- CUBOS_PROFILE ();
- std :: this_thread :: sleep_for ( std :: chrono :: milliseconds ( ms ));
-} static int randomMs ( int min , int max )
-{
- int range = ( min - max ) + 1 ;
- return rand () % range + min ;
-} We can now get the existing metrics and their values:
std :: string name ;
- std :: size_t seenCount = 0 ;
- while ( Metrics :: readName ( name , seenCount ))
- {
- CUBOS_DEBUG ( "Found new metric: {}" , name );
- double value ;
- std :: size_t offset = 0 ;
- while ( Metrics :: readValue ( name , value , offset ))
- {
- CUBOS_DEBUG ( "{} : {}" , name , value );
- }
- } Output:
[ 11 : 34 : 13.824 ] [ main . cpp : 51 main ] debug : Found new metric : "profiling:/home/cubos/core/samples/metrics/main.cpp:simulateFrame:27"
-[ 11 : 34 : 13.824 ] [ main . cpp : 56 main ] debug : "profiling:/home/cubos/core/samples/metrics/main.cpp:simulateFrame:27" : 103.0721
-[ 11 : 34 : 13.824 ] [ main . cpp : 56 main ] debug : "profiling:/home/cubos/core/samples/metrics/main.cpp:simulateFrame:27" : 469.1480
-[ 11 : 34 : 13.825 ] [ main . cpp : 56 main ] debug : "profiling:/home/cubos/core/samples/metrics/main.cpp:simulateFrame:27" : 379.0656
-[ 11 : 34 : 13.825 ] [ main . cpp : 56 main ] debug : "profiling:/home/cubos/core/samples/metrics/main.cpp:simulateFrame:27" : 388.1754
-[ 11 : 34 : 13.825 ] [ main . cpp : 56 main ] debug : "profiling:/home/cubos/core/samples/metrics/main.cpp:simulateFrame:27" : 37.1140
-[ 11 : 34 : 13.825 ] [ main . cpp : 56 main ] debug : "profiling:/home/cubos/core/samples/metrics/main.cpp:simulateFrame:27" : 14.0966
-[ 11 : 34 : 13.825 ] [ main . cpp : 56 main ] debug : "profiling:/home/cubos/core/samples/metrics/main.cpp:simulateFrame:27" : 8.1281
-[ 11 : 34 : 13.825 ] [ main . cpp : 56 main ] debug : "profiling:/home/cubos/core/samples/metrics/main.cpp:simulateFrame:27" : 464.1636
-[ 11 : 34 : 13.826 ] [ main . cpp : 56 main ] debug : "profiling:/home/cubos/core/samples/metrics/main.cpp:simulateFrame:27" : 313.1553
-[ 11 : 34 : 13.826 ] [ main . cpp : 56 main ] debug : "profiling:/home/cubos/core/samples/metrics/main.cpp:simulateFrame:27" : 57.0801
-[ 11 : 34 : 13.826 ] [ main . cpp : 51 main ] debug : Found new metric : "i"
-[ 11 : 34 : 13.826 ] [ main . cpp : 56 main ] debug : "i" : 0.0000
-[ 11 : 34 : 13.827 ] [ main . cpp : 56 main ] debug : "i" : 1.0000
-[ 11 : 34 : 13.827 ] [ main . cpp : 56 main ] debug : "i" : 2.0000
-[ 11 : 34 : 13.827 ] [ main . cpp : 56 main ] debug : "i" : 3.0000
-[ 11 : 34 : 13.827 ] [ main . cpp : 56 main ] debug : "i" : 4.0000
-[ 11 : 34 : 13.827 ] [ main . cpp : 56 main ] debug : "i" : 5.0000
-[ 11 : 34 : 13.828 ] [ main . cpp : 56 main ] debug : "i" : 6.0000
-[ 11 : 34 : 13.828 ] [ main . cpp : 56 main ] debug : "i" : 7.0000
-[ 11 : 34 : 13.828 ] [ main . cpp : 56 main ] debug : "i" : 8.0000
-[ 11 : 34 : 13.828 ] [ main . cpp : 56 main ] debug : "i" : 9.0000
-
-
-
-
-
-
-
-
-
-
-
-
-
Unlike everything else in the docs, the search functionality requires JavaScript.
-
-
Search for symbols, directories, files, pages or
- modules. You can omit any prefix from the symbol or file path; adding a
- :
or /
suffix lists all members of given symbol or
- directory.
-
Use ↓
- / ↑ to navigate through the list,
- Enter to go.
- Tab autocompletes common prefix, you can
- copy a link to the result using ⌘
- L while ⌘
- M produces a Markdown link.
-
-
Sorry, nothing was found.
-
-
-
-
-
-
-
-
-
-
-
diff --git a/preview/pr-1282/examples-core-logging.html b/preview/pr-1282/examples-core-tel-logging.html
similarity index 84%
rename from preview/pr-1282/examples-core-logging.html
rename to preview/pr-1282/examples-core-tel-logging.html
index d0625a865..d3e8b954f 100644
--- a/preview/pr-1282/examples-core-logging.html
+++ b/preview/pr-1282/examples-core-tel-logging.html
@@ -2,7 +2,7 @@
- Examples » Core » Logging | Cubos Docs
+ Examples » Core » Telemetry » Logging | Cubos Docs
@@ -48,15 +48,16 @@
Using the logging system.
-
See also Full source code here .
Logging in Cubos is done through the logging macros defined in core/ log.hpp .
#include <cubos/core/log.hpp> There are six logging levels, each with its own macro. In order of increasing severity, they are:
CUBOS_TRACE ( "Trace message" );
+
See also Full source code here .
Logging in Cubos is done through the logging macros defined in core/ tel/ logging.hpp .
#include <cubos/core/tel/logging.hpp> There are six logging levels, each with its own macro. In order of increasing severity, they are:
CUBOS_TRACE ( "Trace message" );
CUBOS_DEBUG ( "Debug message" );
CUBOS_INFO ( "Info message" );
CUBOS_WARN ( "Warning message" );
CUBOS_ERROR ( "Error message" );
- CUBOS_CRITICAL ( "Critical message" ); The minimum registered log level is set with Logger:: level . On this sample, to demonstrate CUBOS_ TRACE , we set it to Trace :
cubos :: core :: Logger :: level ( cubos :: core :: Logger :: Level :: Trace ); The logger also supports logging to a file, which will by default be named to cubos_<timestamp>.log
.
cubos :: core :: Logger :: logToFile (); Or, if you want, you can set the file manually:
cubos :: core :: Logger :: logToFile ( "/logs/sample_logs.txt" ); $ cat /home/cubos/build/logs/cubos_15:25:30.191.log
+ CUBOS_CRITICAL ( "Critical message" ); The minimum registered log level is set with level . On this sample, to demonstrate CUBOS_ TRACE , we set it to Trace :
cubos :: core :: tel :: level ( cubos :: core :: tel :: Level :: Trace ); The logger also supports logging to a file, which will by default be named to cubos_<timestamp>.log
.
cubos :: core :: tel :: Logger :: logToFile (); Or, if you want, you can set the file manually:
cubos :: core :: tel :: Logger :: logToFile ( "/logs/sample_logs.txt" ); $ cat /home/cubos/build/logs/cubos_15:25:30.191.log
[ 15 :25:30.192] [ file.cpp:124 mount] info: Mounted archive at "" /"logs"
[ 15 :25:30.192] [ file.cpp:322 create] trace: Created "file" "/logs/cubos_15:25:30.191"
[ 15 :25:30.192] [ main.cpp:29 main] trace: Trace message
@@ -83,7 +84,7 @@
[ 15 :23:03.738] [ main.cpp:40 main] info: An std::unordered_map: { 2 : "two" , 1 : "one" }
[ 15 :23:03.738] [ log.cpp:248 streamFormat] warn: You tried to print a type ( "unnamed108664291041692" ) which doesn' t implement reflection. Did you forget to include its reflection definition?
[ 15 :23:03.738] [ main.cpp:41 main] info: A type without reflection: ( no reflection)
-t reflection: ( no reflection) Note By default, on debug builds all logging calls are compiled, while on release builds only messages with severity level CUBOS_ LOG_ LEVEL_ INFO or higher are compiled. This can be changed by defining CUBOS_ LOG_ LEVEL to the desired level.
These macros can also take arguments, which can be of any reflectable type.
CUBOS_INFO ( "An integer: {}" , 1 );
+t reflection: ( no reflection) Note By default, on debug builds all logging calls are compiled, while on release builds only messages with severity level CUBOS_ TEL_ LEVEL_ INFO or higher are compiled. This can be changed by defining CUBOS_ TEL_ LEVEL to the desired level.
These macros can also take arguments, which can be of any reflectable type.
CUBOS_INFO ( "An integer: {}" , 1 );
CUBOS_INFO ( "A glm::vec3: {}" , glm :: vec3 ( 0.0F , 1.0F , 2.0F ));
CUBOS_INFO ( "An std::unordered_map: {}" , std :: unordered_map < int , const char *> {{ 1 , "one" }, { 2 , "two" }});
} To print external types, such as glm
math types, STL
types (std::string
, ...) or primitives (int
, ...), you'll have to include their respective headers in the core/reflection/external directory. Notice that although we aren't printing C-strings directly, we must still include them as our std::unordered_map
contains const char*
s.
#include <cubos/core/reflection/external/cstring.hpp>
diff --git a/preview/pr-1282/examples-core-tel-metrics.html b/preview/pr-1282/examples-core-tel-metrics.html
new file mode 100644
index 000000000..5f5d55d9f
--- /dev/null
+++ b/preview/pr-1282/examples-core-tel-metrics.html
@@ -0,0 +1,167 @@
+
+
+
+
+ Examples » Core » Telemetry » Metrics | Cubos Docs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Using the metrics system.
+
See also Full source code here .
Registering metrics and profiling in Cubos can be done through the metric macros defined in core/ tel/ metrics.hpp and the core::tel::Metrics class. In order to enable these features, compile with -DENABLE_PROFILING
.
#include <cubos/core/tel/metrics.hpp>
+
+using cubos :: core :: tel :: Metrics ; The following example demonstrates a simple usage of the core::tel::Metrics class, simulating a random function that takes X milliseconds to finish, where X is randomly generated, and also registering metrics values.
This is the main loop:
const int numFrames = 10 ;
+ for ( int i = 0 ; i < numFrames ; ++ i )
+ {
+ // simulate frame by calling a function that does work..
+ simulateFrame ( randomMs ( 0 , 500 ));
+
+ // register some metrics, this could be FPS, entities count, ....
+ CUBOS_METRIC ( "i" , i );
+ } Which calls these utility functions:
static void simulateFrame ( int ms )
+{
+ CUBOS_SPAN_INFO ( "simulateFrame" );
+ std :: this_thread :: sleep_for ( std :: chrono :: milliseconds ( ms ));
+} static int randomMs ( int min , int max )
+{
+ int range = ( min - max ) + 1 ;
+ return rand () % range + min ;
+} We can now get the existing metrics and their values:
std :: string name ;
+ std :: size_t seenCount = 0 ;
+ while ( Metrics :: readName ( name , seenCount ))
+ {
+ CUBOS_DEBUG ( "Found new metric: {}" , name );
+ double value ;
+ std :: size_t offset = 0 ;
+ while ( Metrics :: readValue ( name , value , offset ))
+ {
+ CUBOS_DEBUG ( "{} : {}" , name , value );
+ }
+ } Output:
[ 17 : 21 : 59.677 ] [ main . cpp : 53 main ] [ thread21496 ] debug : Found new metric : "thread21496:simulateFrame:begin"
+[ 17 : 21 : 59.679 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:simulateFrame:begin" : 5.0244E+8
+[ 17 : 21 : 59.680 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:simulateFrame:begin" : 5.0244E+8
+[ 17 : 21 : 59.681 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:simulateFrame:begin" : 5.0244E+8
+[ 17 : 21 : 59.681 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:simulateFrame:begin" : 5.0244E+8
+[ 17 : 21 : 59.682 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:simulateFrame:begin" : 5.0244E+8
+[ 17 : 21 : 59.683 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:simulateFrame:begin" : 5.0244E+8
+[ 17 : 21 : 59.684 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:simulateFrame:begin" : 5.0244E+8
+[ 17 : 21 : 59.685 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:simulateFrame:begin" : 5.0244E+8
+[ 17 : 21 : 59.686 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:simulateFrame:begin" : 5.0244E+8
+[ 17 : 21 : 59.687 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:simulateFrame:begin" : 5.0244E+8
+[ 17 : 21 : 59.687 ] [ main . cpp : 53 main ] [ thread21496 ] debug : Found new metric : "thread21496:simulateFrame:end"
+[ 17 : 21 : 59.688 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:simulateFrame:end" : 5.0244E+8
+[ 17 : 21 : 59.689 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:simulateFrame:end" : 5.0244E+8
+[ 17 : 21 : 59.690 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:simulateFrame:end" : 5.0244E+8
+[ 17 : 21 : 59.691 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:simulateFrame:end" : 5.0244E+8
+[ 17 : 21 : 59.693 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:simulateFrame:end" : 5.0244E+8
+[ 17 : 21 : 59.694 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:simulateFrame:end" : 5.0244E+8
+[ 17 : 21 : 59.695 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:simulateFrame:end" : 5.0244E+8
+[ 17 : 21 : 59.696 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:simulateFrame:end" : 5.0244E+8
+[ 17 : 21 : 59.697 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:simulateFrame:end" : 5.0244E+8
+[ 17 : 21 : 59.698 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:simulateFrame:end" : 5.0244E+8
+[ 17 : 21 : 59.699 ] [ main . cpp : 53 main ] [ thread21496 ] debug : Found new metric : "thread21496:i"
+[ 17 : 21 : 59.700 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:i" : 0.0000
+[ 17 : 21 : 59.701 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:i" : 1.0000
+[ 17 : 21 : 59.701 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:i" : 2.0000
+[ 17 : 21 : 59.702 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:i" : 3.0000
+[ 17 : 21 : 59.703 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:i" : 4.0000
+[ 17 : 21 : 59.704 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:i" : 5.0000
+[ 17 : 21 : 59.705 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:i" : 6.0000
+[ 17 : 21 : 59.706 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:i" : 7.0000
+[ 17 : 21 : 59.707 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:i" : 8.0000
+[ 17 : 21 : 59.708 ] [ main . cpp : 58 main ] [ thread21496 ] debug : "thread21496:i" : 9.0000
+
+
+
+
+
+
+
+
+
+
+
+
+
Unlike everything else in the docs, the search functionality requires JavaScript.
+
+
Search for symbols, directories, files, pages or
+ modules. You can omit any prefix from the symbol or file path; adding a
+ :
or /
suffix lists all members of given symbol or
+ directory.
+
Use ↓
+ / ↑ to navigate through the list,
+ Enter to go.
+ Tab autocompletes common prefix, you can
+ copy a link to the result using ⌘
+ L while ⌘
+ M produces a Markdown link.
+
+
Sorry, nothing was found.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/preview/pr-1282/examples-core-tel-tracing.html b/preview/pr-1282/examples-core-tel-tracing.html
new file mode 100644
index 000000000..98858a9f9
--- /dev/null
+++ b/preview/pr-1282/examples-core-tel-tracing.html
@@ -0,0 +1,120 @@
+
+
+
+
+ Examples » Core » Telemetry » Tracing | Cubos Docs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Using the tracing system.
+
See also Full source code here .
Tracing in CUBOS can be done through the tracing macros defined in core/ tel/ tracing.hpp and the core::tel::SpanManager class.
#include <cubos/core/tel/level.hpp>
+#include <cubos/core/tel/logging.hpp>
+#include <cubos/core/tel/tracing.hpp>
+
+using cubos :: core :: tel :: Level ;
+using cubos :: core :: tel :: Logger ;
+using cubos :: core :: tel :: SpanManager ; The following example demonstrates a simple usage of the tracing macros and core::tel::SpanManager class, utilizing spans to track execution flow and log messages.
cubos :: core :: tel :: level ( Level :: Debug ); The tracing level is shared with logger's one, via core::tel::level function.
Using the macros is simple as:
You can also do manual span management:
SpanManager :: begin ( "manual_span" , cubos :: core :: tel :: Level :: Debug );
+ CUBOS_INFO ( "entered a manual span" );
+
+ SpanManager :: end ();
+ CUBOS_INFO ( "after exit manual span" ); We can observe the output of the tracing as follows:
[16:03:31 .966 ] [ main.cpp : 20 main ] [ thread11740 ] info : hello from root span !
+[16:03:31 .967 ] [ main.cpp : 26 main ] [ thread11740 : main_span ] info : hello !
+[16:03:31 .967 ] [ main.cpp : 29 main ] [ thread11740 : main_span : other_scope ] info : hello again !
+[16:03:31 .968 ] [ main.cpp : 34 main ] [ thread11740 : main_span : other_scope : manual_span ] info : entered a manual span
+[16:03:31 .969 ] [ main.cpp : 37 main ] [ thread11740 : main_span : other_scope ] info : after exit manual span
+
+
+
+
+
+
+
+
+
+
+
+
+
Unlike everything else in the docs, the search functionality requires JavaScript.
+
+
Search for symbols, directories, files, pages or
+ modules. You can omit any prefix from the symbol or file path; adding a
+ :
or /
suffix lists all members of given symbol or
+ directory.
+
Use ↓
+ / ↑ to navigate through the list,
+ Enter to go.
+ Tab autocompletes common prefix, you can
+ copy a link to the result using ⌘
+ L while ⌘
+ M produces a Markdown link.
+
+
Sorry, nothing was found.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/preview/pr-1282/examples-core-tel.html b/preview/pr-1282/examples-core-tel.html
new file mode 100644
index 000000000..1468d282a
--- /dev/null
+++ b/preview/pr-1282/examples-core-tel.html
@@ -0,0 +1,105 @@
+
+
+
+
+ Examples » Core » Telemetry | Cubos Docs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Unlike everything else in the docs, the search functionality requires JavaScript.
+
+
Search for symbols, directories, files, pages or
+ modules. You can omit any prefix from the symbol or file path; adding a
+ :
or /
suffix lists all members of given symbol or
+ directory.
+
Use ↓
+ / ↑ to navigate through the list,
+ Enter to go.
+ Tab autocompletes common prefix, you can
+ copy a link to the result using ⌘
+ L while ⌘
+ M produces a Markdown link.
+
+
Sorry, nothing was found.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/preview/pr-1282/examples-core.html b/preview/pr-1282/examples-core.html
index ed303a26d..2c3cd9e7b 100644
--- a/preview/pr-1282/examples-core.html
+++ b/preview/pr-1282/examples-core.html
@@ -50,7 +50,7 @@
Core
Showcases features of the Core library.
-
Note This is not the right place to learn how to use the engine. However, if you plan to work on the engine itself, it's possible, if not probable, that you will need to use some of the features of the Core library directly.
The following examples have fully documented tutorials:
+
Note This is not the right place to learn how to use the engine. However, if you plan to work on the engine itself, it's possible, if not probable, that you will need to use some of the features of the Core library directly.
The following examples have fully documented tutorials: