-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #134 from cactusdynamics/examples-update
Batch 1 of example updates
- Loading branch information
Showing
20 changed files
with
207 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
add_executable(rt_lockless_realtime_read_example | ||
realtime_read.cc | ||
) | ||
|
||
target_link_libraries(rt_lockless_realtime_read_example | ||
PRIVATE | ||
cactus_rt | ||
) | ||
|
||
setup_cactus_rt_target_options(rt_lockless_realtime_read_example) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Lockless examples | ||
================= | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
`simple_example` | ||
================ | ||
|
||
The simplest real-time example to get started with. | ||
This gives you the most basic scaffolding to get started with in a 1000-Hz | ||
real-time application without any bells and whistles. | ||
|
||
To run this: | ||
|
||
```bash | ||
$ make debug | ||
$ sudo build/debug/examples/simple_example/rt_simple_example | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,37 @@ | ||
Tracing example | ||
=============== | ||
`tracing_example` | ||
================= | ||
|
||
Designed to show off how to trace a real-time application. | ||
Designed to show off how to trace a real-time application with the | ||
real-time-safe tracing system. | ||
|
||
Features demonstrated: | ||
|
||
1. Enable tracing. | ||
2. Trace custom spans in the application. | ||
1. Enable and disable tracing dynamically. | ||
2. Trace custom code in your application with spans. | ||
3. Setting the output file location. | ||
|
||
To run this: | ||
|
||
```bash | ||
$ make debug | ||
$ sudo build/debug/examples/tracing_example/rt_tracing_example | ||
``` | ||
|
||
To visualize the trace, go to https://cactusdynamics.github.io/perfetto (or | ||
https://ui.perfetto.dev which doesn't have as much bells and whistles) and load | ||
the trace in `build/data1.perfetto` and `build/data2.perfetto`. | ||
|
||
You should be able to see something like this: | ||
|
||
![image](./perfetto-timeline1.png) | ||
|
||
By clicking on the `Loop` slice, filtering and sorting with the table that pops | ||
up, then clicking on the ID of the longest `Loop` in the table will bring you to | ||
the following view: | ||
|
||
![image](./perfetto-timeline2.png) | ||
|
||
Clicking on the _Latency_ tab on the side bar and selecting the right span will | ||
get you something like the following: | ||
|
||
![image](./perfetto-hist.png) |
Oops, something went wrong.