lf-lang / reactor-uc

A lightweight reactor runtime targeted at resource-constrained embedded systems
BSD 2-Clause "Simplified" License
3 stars 1 forks source link

Remove the config.h.in and do things through compile defs #103

Closed erlingrj closed 4 weeks ago

erlingrj commented 4 weeks ago

Addresses #75

github-actions[bot] commented 4 weeks ago

Memory usage after merging this PR will be:

Memory Report ## action_microstep_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 54117 | 54195 | 0.14 | | data | 752 | 752 | 0.00 | | bss | 480 | 480 | 0.00 | | total | 55349 | 55427 | 0.14 | ## action_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 53920 | 53998 | 0.14 | | data | 752 | 752 | 0.00 | | bss | 480 | 480 | 0.00 | | total | 55152 | 55230 | 0.14 | ## delayed_conn_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 54626 | 54719 | 0.17 | | data | 744 | 744 | 0.00 | | bss | 480 | 480 | 0.00 | | total | 55850 | 55943 | 0.17 | ## event_payload_pool_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 18297 | 18297 | 0.00 | | data | 624 | 624 | 0.00 | | bss | 320 | 320 | 0.00 | | total | 19241 | 19241 | 0.00 | ## event_queue_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 27185 | 27239 | 0.20 | | data | 728 | 728 | 0.00 | | bss | 480 | 480 | 0.00 | | total | 28393 | 28447 | 0.19 | ## nanopb_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 42661 | 42661 | 0.00 | | data | 904 | 904 | 0.00 | | bss | 320 | 320 | 0.00 | | total | 43885 | 43885 | 0.00 | ## physical_action_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 55105 | 55159 | 0.10 | | data | 769 | 769 | 0.00 | | bss | 2048 | 10240 | 400.00 | | total | 57922 | 66168 | 14.24 | ## port_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 54501 | 54594 | 0.17 | | data | 744 | 744 | 0.00 | | bss | 480 | 480 | 0.00 | | total | 55725 | 55818 | 0.17 | ## reaction_queue_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 26849 | 26951 | 0.38 | | data | 728 | 728 | 0.00 | | bss | 480 | 480 | 0.00 | | total | 28057 | 28159 | 0.36 | ## request_shutdown_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 54679 | 54757 | 0.14 | | data | 744 | 744 | 0.00 | | bss | 480 | 480 | 0.00 | | total | 55903 | 55981 | 0.14 | ## shutdown_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 51815 | 51869 | 0.10 | | data | 752 | 752 | 0.00 | | bss | 2720 | 10912 | 301.18 | | total | 55287 | 63533 | 14.91 | ## startup_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 51146 | 51200 | 0.11 | | data | 752 | 752 | 0.00 | | bss | 2496 | 10688 | 328.21 | | total | 54394 | 62640 | 15.16 | ## tcp_channel_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 55382 | 55382 | 0.00 | | data | 1160 | 1160 | 0.00 | | bss | 11072 | 11072 | 0.00 | | total | 67614 | 67614 | 0.00 | ## timer_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 51047 | 51101 | 0.11 | | data | 744 | 744 | 0.00 | | bss | 2528 | 10720 | 324.05 | | total | 54319 | 62565 | 15.18 |
github-actions[bot] commented 4 weeks ago

Memory usage after merging this PR will be:

Memory Report ## action_microstep_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 54117 | 54195 | 0.14 | | data | 752 | 752 | 0.00 | | bss | 480 | 480 | 0.00 | | total | 55349 | 55427 | 0.14 | ## action_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 53920 | 53998 | 0.14 | | data | 752 | 752 | 0.00 | | bss | 480 | 480 | 0.00 | | total | 55152 | 55230 | 0.14 | ## delayed_conn_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 54626 | 54719 | 0.17 | | data | 744 | 744 | 0.00 | | bss | 480 | 480 | 0.00 | | total | 55850 | 55943 | 0.17 | ## event_payload_pool_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 18297 | 18297 | 0.00 | | data | 624 | 624 | 0.00 | | bss | 320 | 320 | 0.00 | | total | 19241 | 19241 | 0.00 | ## event_queue_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 27185 | 27239 | 0.20 | | data | 728 | 728 | 0.00 | | bss | 480 | 480 | 0.00 | | total | 28393 | 28447 | 0.19 | ## nanopb_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 42661 | 42661 | 0.00 | | data | 904 | 904 | 0.00 | | bss | 320 | 320 | 0.00 | | total | 43885 | 43885 | 0.00 | ## physical_action_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 55105 | 55159 | 0.10 | | data | 769 | 769 | 0.00 | | bss | 2048 | 10240 | 400.00 | | total | 57922 | 66168 | 14.24 | ## port_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 54501 | 54594 | 0.17 | | data | 744 | 744 | 0.00 | | bss | 480 | 480 | 0.00 | | total | 55725 | 55818 | 0.17 | ## reaction_queue_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 26849 | 26951 | 0.38 | | data | 728 | 728 | 0.00 | | bss | 480 | 480 | 0.00 | | total | 28057 | 28159 | 0.36 | ## request_shutdown_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 54679 | 54757 | 0.14 | | data | 744 | 744 | 0.00 | | bss | 480 | 480 | 0.00 | | total | 55903 | 55981 | 0.14 | ## shutdown_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 51815 | 51869 | 0.10 | | data | 752 | 752 | 0.00 | | bss | 2720 | 10912 | 301.18 | | total | 55287 | 63533 | 14.91 | ## startup_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 51146 | 51200 | 0.11 | | data | 752 | 752 | 0.00 | | bss | 2496 | 10688 | 328.21 | | total | 54394 | 62640 | 15.16 | ## tcp_channel_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 55382 | 55382 | 0.00 | | data | 1160 | 1160 | 0.00 | | bss | 11072 | 11072 | 0.00 | | total | 67614 | 67614 | 0.00 | ## timer_test_c | | from | to | increase (%) | | -- | ---- | ------ | ------------ | | text | 51047 | 51101 | 0.11 | | data | 744 | 744 | 0.00 | | bss | 2528 | 10720 | 324.05 | | total | 54319 | 62565 | 15.18 |
github-actions[bot] commented 4 weeks ago

Coverage after merging select-network-chan into main will be

75.14%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
include/reactor-uc
   encoding.h75%50%100%80%13–14, 23–24
src
   action.c97.18%85.71%100%100%23, 33
   builtin_triggers.c90.24%70%100%96.43%14, 18, 37, 40
   connection.c80.69%53.85%100%89.69%10, 101, 107, 11, 120–121, 133–134, 14, 14, 140, 142, 17–18, 18, 18–19, 21, 23–24, 29, 44, 47, 52, 57–59, 94
   environment.c88.46%83.33%83.33%90.74%28, 35–36, 76–78, 9
   event.c94.44%90%100%95.65%10, 4
   federated.c0%0%0%0%102–104, 104, 104–105, 105, 105–107, 109, 112–113, 115–119, 121–126, 128, 128, 128–131, 133, 133, 133–135, 135, 135–136, 14, 140–141, 141, 141, 144–145, 149, 15, 150–151, 153, 153, 153, 155–159, 161–162, 162, 162–163, 165–166, 169, 17, 170, 175–176, 176, 176–177, 179, 18, 181, 181, 181–184, 184, 184, 184, 184–189, 19, 190–196, 20, 200, 203, 203, 203–205, 209–210, 212–213, 213, 213, 213–219, 22, 22, 22, 220–221, 223, 225–227, 23, 23, 23, 230–232, 235, 239–246, 249, 25, 25, 25, 250, 252–253, 255–258, 26, 260, 260, 260–262, 264, 27, 27, 27–29, 33–34, 38–45, 45, 45–46, 46, 46–47, 47, 47, 50–51, 53–56, 58–60, 62, 64, 66, 66, 66–67, 69–70, 70, 70–71, 73–74, 76, 80–81, 83–85, 88, 90–95, 97–99
   logging.c73.21%60%100%75%24, 24–27, 37–39, 46, 46–49, 59–60
   port.c90.91%58.33%100%100%10, 15, 19, 24–25
   queues.c90.74%80.77%100%94.90%102, 107, 113, 21–23, 46–47, 59–60, 83–87
   reaction.c90.41%75%100%97.78%18, 20, 24, 43–44, 54, 56
   reactor.c67.14%40%100%76.09%16, 19–20, 20, 20–21, 21, 21–22, 24, 38–39, 42–43, 43, 43–44, 44, 44–45, 47, 60–61
   scheduler.c81.15%64.77%94.12%87.02%102, 104, 104, 111, 125, 17, 174, 177, 177, 177–180, 182–183, 183, 183–184, 204, 224–225, 231–233, 27, 277–278, 282, 286–287, 305, 31, 36, 52–54, 54, 54–56, 56, 56, 58, 58, 58–59, 61–62, 62, 62–63, 69–72, 80–81, 85
   tag.c40.19%31.48%60%47.92%14, 14–15, 17, 17–18, 23–24, 24, 24, 24, 24–25, 27, 27, 27, 27, 27–28, 30, 30, 30–31, 33–34, 34, 34–35, 37, 37, 37, 37, 37–38, 40, 40, 40, 40, 40–41, 43, 53–54, 63, 63–64, 83–85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85–87, 89
   timer.c94.59%66.67%100%100%14, 25
   trigger.c100%100%100%100%
src/platform/posix
   posix.c79.41%55.56%85.71%84.29%100, 16, 18, 20–21, 34–36, 38–40, 48–49, 62, 67, 79, 82, 88, 94
   tcp_ip_channel.c79.32%65.79%100%84.87%115–117, 124, 129–131, 139, 139–141, 167–168, 168, 168–169, 174–175, 192–193, 197–198, 209, 212, 217, 231–232, 244, 246, 250–251, 265–266, 270–271, 275–276, 285–286, 288–289, 36–37, 42–43, 47–48, 80, 86