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

Do startup-coordination using system events #237

Open
wants to merge 10 commits into
base: clock-sync3
Choose a base branch
from

Conversation

erlingrj
Copy link
Collaborator

@erlingrj erlingrj commented Mar 4, 2025

This PR should be merged after the clock-sync PR. It moves the startup coordination over to using the system event queue as well. The only thing that happens before starting the system event queue is that we do the setup of all our connections, blocking, at the assemble of the environment.

Copy link
Contributor

github-actions bot commented Mar 4, 2025

Benchmark results after merging this PR:

Benchmark results

Performance:

PingPongUc:
Best Time: 179.997 msec
Worst Time: 189.040 msec
Median Time: 180.518 msec

PingPongC:
Best Time: 170.675 msec
Worst Time: 178.697 msec
Median Time: 170.802 msec

ReactionLatencyUc:
Best latency: 38519 nsec
Median latency: 60028 nsec
Worst latency: 573816 nsec

ReactionLatencyC:
Best latency: 25715 nsec
Median latency: 60088 nsec
Worst latency: 116117 nsec

Memory usage:

PingPongUc:
text data bss dec hex filename
41498 760 8240 50498 c542 bin/PingPongUc

PingPongC:
text data bss dec hex filename
45826 880 360 47066 b7da bin/PingPongC

ReactionLatencyUc:
text data bss dec hex filename
31549 744 2384 34677 8775 bin/ReactionLatencyUc

ReactionLatencyC:
text data bss dec hex filename
41536 848 360 42744 a6f8 bin/ReactionLatencyC

@erlingrj erlingrj changed the base branch from main to clock-sync3 March 4, 2025 15:58
Copy link
Contributor

github-actions bot commented Mar 4, 2025

Memory usage after merging this PR will be:

Memory Report

action_empty_test_c

from to increase (%)
text 64817 65330 0.79
data 752 752 0.00
bss 12320 12320 0.00
total 77889 78402 0.66

action_microstep_test_c

from to increase (%)
text 65684 66197 0.78
data 760 760 0.00
bss 12384 12384 0.00
total 78828 79341 0.65

action_overwrite_test_c

from to increase (%)
text 65518 66031 0.78
data 752 752 0.00
bss 12384 12384 0.00
total 78654 79167 0.65

action_test_c

from to increase (%)
text 65422 65935 0.78
data 760 760 0.00
bss 12384 12384 0.00
total 78566 79079 0.65

deadline_test_c

from to increase (%)
text 60990 61497 0.83
data 768 768 0.00
bss 11712 11712 0.00
total 73470 73977 0.69

delayed_conn_test_c

from to increase (%)
text 66251 66758 0.77
data 752 752 0.00
bss 13120 13120 0.00
total 80123 80630 0.63

event_payload_pool_test_c

from to increase (%)
text 19170 19093 -0.40
data 624 624 0.00
bss 320 320 0.00
total 20114 20037 -0.38

event_queue_test_c

from to increase (%)
text 28670 28670 0.00
data 728 728 0.00
bss 480 480 0.00
total 29878 29878 0.00

nanopb_test_c

from to increase (%)
text 44010 44010 0.00
data 1800 1800 0.00
bss 320 320 0.00
total 46130 46130 0.00

physical_clock_test_c

from to increase (%)
text 53433 53940 0.95
data 752 752 0.00
bss 928 928 0.00
total 55113 55620 0.92

port_test_c

from to increase (%)
text 66167 66674 0.77
data 752 752 0.00
bss 12992 12992 0.00
total 79911 80418 0.63

reaction_queue_test_c

from to increase (%)
text 27900 27900 0.00
data 728 728 0.00
bss 480 480 0.00
total 29108 29108 0.00

request_shutdown_test_c

from to increase (%)
text 65656 66169 0.78
data 752 752 0.00
bss 12384 12384 0.00
total 78792 79305 0.65

startup_test_c

from to increase (%)
text 60582 61089 0.84
data 760 760 0.00
bss 11712 11712 0.00
total 73054 73561 0.69

tcp_channel_test_c

from to increase (%)
text 98001 98508 0.52
data 2152 2152 0.00
bss 14720 14784 0.43
total 114873 115444 0.50

timer_test_c

from to increase (%)
text 60588 61095 0.84
data 752 752 0.00
bss 11712 11712 0.00
total 73052 73559 0.69

Copy link
Contributor

github-actions bot commented Mar 4, 2025

Coverage after merging system-event into clock-sync3 will be

57.01%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   action.c77.31%66.67%100%80%132–133, 24, 42–45, 48, 50–51, 54–57, 63–64, 71–73, 73, 73–76, 82–84
   builtin_triggers.c90.91%70%100%96.77%14, 18, 40, 43
   clock_synchronization.c0%0%0%0%101–104, 104, 104–110, 110, 110–113, 116, 118, 120, 122, 122, 122–124, 124, 124, 127, 127, 127–128, 131–137, 137, 137–138, 142, 144–149, 15, 150, 150, 150, 152, 155–159, 16, 160, 160, 160–161, 163, 165, 168–169, 171–173, 173, 173–174, 174, 174–179, 18, 180–183, 183, 183–184, 186, 189, 19, 190, 192–194, 196, 196, 196–197, 199, 20, 202–203, 205–209, 21, 210–212, 212, 212–214, 219–222, 222, 222–224, 226–227, 231–232, 234–235, 235, 235–236, 236, 236–239, 24, 24, 24, 240–244, 244, 244–245, 247, 25, 251, 254–255, 258–259, 26, 260–267, 267, 267–268, 271, 274–277, 280, 280, 280, 280, 280, 280, 280, 280–289, 29, 290–298, 30, 301–302, 304, 308–309, 31, 310–316, 318, 321, 321, 321–322, 326–330, 333, 333, 333–334, 337, 339, 34–37, 39, 39, 39–41, 41, 41–42, 45, 48, 55–56, 58–59, 59, 59–61, 64–67, 69–70, 70, 70–73, 78–80, 80, 80–82, 84–86, 86, 86–88, 88, 88, 88, 88–90, 93–94, 96, 99
   connection.c77.33%51.16%100%86.73%10, 104, 11, 110, 123–124, 136–137, 14, 14, 143, 145–146, 148, 16–17, 21–22, 22, 22–23, 25, 27–28, 33, 48, 48, 48–49, 55, 60–62, 97
   environment.c79.69%56.25%92.31%86.75%114–116, 126–128, 14–15, 24, 29–31, 31, 31–32, 38, 46, 50–51, 57–58, 72–73, 77–78
   event.c100%100%100%100%
   federated.c6.76%3.30%10%8.33%10, 100, 102, 102, 102–103, 105, 105, 105, 105, 105–106, 106, 106–108, 11, 111, 111, 111–113, 115–116, 119–121, 121, 121–122, 122, 122–124, 126, 129, 13, 130, 132–136, 14, 140–142, 144, 144, 144, 146–149, 15, 151–152, 152, 152–153, 155–156, 159, 16, 160, 165–166, 166, 166–167, 169, 171, 171, 171–174, 174, 174, 174, 174, 174–179, 18, 18, 18, 180–183, 183, 183–184, 186–189, 19, 19, 19, 190–194, 198, 201, 201, 201–203, 206, 208, 21, 21, 21, 211–212, 212, 212, 212, 212–217, 219, 22, 220–221, 221, 221–222, 225, 228–229, 23, 23, 23, 230–231, 234–235, 24, 241–243, 25, 256–257, 257, 257–258, 258, 258–259, 259, 259–260, 260, 260–261, 261, 261–262, 262, 262–263, 263, 263, 265, 265, 265–266, 266, 266–267, 267, 267–268, 268, 268–269, 269, 269, 271, 29–30, 34–35, 37–40, 42, 44, 44, 44–45, 45, 45–46, 46, 46–47, 47, 47, 49, 51–54, 56, 56, 56–59, 59, 59–60, 62, 64–65, 65, 65–66, 70, 73–74, 74, 74–75, 77–79, 81, 85–86, 88–90, 93, 95–99
   logging.c88.52%83.33%100%89.36%25, 38–40, 47, 60–61
   network_channel.c69.23%62.50%100%70.59%42, 42, 42, 47–50, 59
   physical_clock.c93.62%62.50%100%100%16, 23, 5
   port.c74.68%42.86%100%91.49%10, 10, 10, 15, 15, 15–16, 22, 26, 31, 31–33, 33, 33–34, 45, 45, 45–46
   queues.c86.21%79.03%100%88.37%115–119, 122–123, 140, 145, 151, 29, 29, 33–38, 61–62, 86, 86, 90–95
   reaction.c71.43%54.55%100%80%15, 17, 21, 28–31, 31, 31–32, 42, 45, 47, 52–53, 53, 53–55, 55, 55–56, 73, 89–91, 91, 91–94, 94, 94–95
   reactor.c69.33%51.52%100%82.28%10, 101–102, 14–19, 22, 28, 30, 32–37, 37, 37–38, 38, 38, 43, 55, 58–59, 59, 59–60, 60, 60–61, 63, 77–78, 81–82, 82, 82–83, 83, 83–84, 86, 91
   serialization.c37.50%25%50%40%16–17, 26–27, 33–34, 34, 34–35, 37–38, 41–42, 42, 42–43, 45–46
   startup_coordinator.c0%0%0%0%100, 103, 105, 108, 110–111, 111, 111, 114–115, 115, 115–117, 120–121, 121, 121–123, 125, 125, 125–129, 129, 129, 13,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant