Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mechanism for printing execution statistics #1743

Merged
merged 1 commit into from
May 18, 2023
Merged

Mechanism for printing execution statistics #1743

merged 1 commit into from
May 18, 2023

Conversation

cmnrd
Copy link
Collaborator

@cmnrd cmnrd commented May 17, 2023

This adds the print-statistics target property and pulls in lf-lang/reactor-cpp#47. If print-statistics is true, the compiled program will print an output like the following when the program terminates.

[INFO]  -----------------------------------------------------------
[INFO]  Program statistics:
[INFO]    - number of reactors:    4
[INFO]    - number of connections: 4
[INFO]    - number of reactions    9
[INFO]    - number of actions:     11
[INFO]    - number of ports:       8
[INFO]  Execution statistics:
[INFO]    - processed events:      12000015
[INFO]    - triggered actions:     12000021
[INFO]    - processed reactions:   36000039
[INFO]    - set ports:             24000024
[INFO]    - scheduled actions:     12000021
[INFO]  -----------------------------------------------------------

This adds the `print-statistics` target property and pulls in
lf-lang/reactor-cpp#47. If `print-statistics` is true,
the compiled program will print an output like the following when the program
terminates.

```
[INFO]  -----------------------------------------------------------
[INFO]  Program statistics:
[INFO]    - number of reactors:    4
[INFO]    - number of connections: 4
[INFO]    - number of reactions    9
[INFO]    - number of actions:     11
[INFO]    - number of ports:       8
[INFO]  Execution statistics:
[INFO]    - processed events:      12000015
[INFO]    - triggered actions:     12000021
[INFO]    - processed reactions:   36000039
[INFO]    - set ports:             24000024
[INFO]    - scheduled actions:     12000021
[INFO]  -----------------------------------------------------------
```
@cmnrd cmnrd requested review from lhstrh and patilatharva May 17, 2023 12:46
Copy link
Member

@lhstrh lhstrh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't yet looked at the changes in reactor-cpp, but these changes look good!

@cmnrd cmnrd merged commit 73c52a5 into master May 18, 2023
@cmnrd cmnrd deleted the cpp-statistics branch May 18, 2023 08:11
@petervdonovan petervdonovan added the feature New feature label Aug 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants