Merge branch 'enhance-doc' into 'master'
Enhance and update doc See merge request micro-ROS/ros_tracing/ros2_tracing!125
This commit is contained in:
commit
d7875ccd74
1 changed files with 15 additions and 3 deletions
|
@ -647,9 +647,19 @@ tracetools_analysis <-- ros2trace_analysis
|
|||
@enduml
|
||||
```
|
||||
|
||||
## Analysis architecture
|
||||
## Analysis
|
||||
|
||||
With profiling as an example implementation.
|
||||
### Design
|
||||
|
||||
Generally, for a given trace data analysis objective, the following classes are extended: `EventHandler`, `DataModel`, and `DataModelUtil`.
|
||||
|
||||
A user/developer can implement an `EventHandler`, which defines callbacks for specific events. Those callbacks get called by the `Processor`, and end up putting slightly-processed data into a `DataModel`, which is a data container that uses `pandas` `DataFrame`s.
|
||||
|
||||
Meaningful data can be extracted from the `DataModel`. However, a `DataModelUtil` can provide common utility functions so that users don't have to re-write them. This meaningful output data can then be presented through a Jupyter notebook (e.g. plots) or a normal Python script (e.g. tables).
|
||||
|
||||
### Architecture
|
||||
|
||||
With profiling as an example implementation:
|
||||
|
||||
```plantuml
|
||||
@startuml
|
||||
|
@ -669,7 +679,7 @@ abstract class Dependant {
|
|||
+dependencies(): list {static}
|
||||
}
|
||||
abstract class EventHandler {
|
||||
+handler_map
|
||||
+handler_map(): map
|
||||
+data(): DataModel {abstract}
|
||||
+process(events) {static}
|
||||
}
|
||||
|
@ -684,6 +694,7 @@ EventHandler <|-- ProfileHandler
|
|||
Processor o-- EventHandler
|
||||
|
||||
abstract class DataModel {
|
||||
+print_data() {abstract}
|
||||
}
|
||||
class ProfileDataModel {
|
||||
+times: DataFrame
|
||||
|
@ -693,6 +704,7 @@ DataModel <|-- ProfileDataModel
|
|||
ProfileDataModel o-- ProfileHandler
|
||||
|
||||
abstract class DataModelUtil {
|
||||
+print_data(): DataModel
|
||||
+convert_time_columns(df, columns): df {static}
|
||||
}
|
||||
class ProfileDataModelUtil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue