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

Make event timestamps follow the spec more closely. #25266

Merged

Conversation

bzbarsky-apple
Copy link
Contributor

@bzbarsky-apple bzbarsky-apple commented Feb 23, 2023

  • We were using "monotonic timestamp" as a synonym for "time since boot", but nothing actually guarantees that. Switch to measuring time since server init for "time since boot". This is the spec fix.
  • Get rid of CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS. Just always try the realtime clock before falling back on since-boot timestamps. Since this might change which timestamps we use dynamically, make sure that our consecutive timestamps are in fact the same type when doing delta encoding.
  • Improve tests to test both since-boot and realtime timestamps.

@github-actions
Copy link

PR #25266: Size comparison from 19fbda3 to 36cfa7e

Increases (2 builds for cc32xx, mbed)
platform target config section 19fbda3 36cfa7e change % change
cc32xx lock CC3235SF_LAUNCHXL (read only) 642569 642689 120 0.0
(read/write) 203664 203672 8 0.0
.bss 197064 197072 8 0.0
.debug_frame 299764 299768 4 0.0
.debug_info 20249761 20250840 1079 0.0
.debug_line 2655140 2655389 249 0.0
.debug_loc 2795460 2795907 447 0.0
.debug_str 3018033 3018715 682 0.0
.strtab 377761 377805 44 0.0
.text 534628 534748 120 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2466856 2466984 128 0.0
.bss 215780 215788 8 0.0
.text 1429500 1429628 128 0.0
Decreases (1 build for cc32xx)
platform target config section 19fbda3 36cfa7e change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_abbrev 930138 930133 -5 -0.0
Full report (2 builds for cc32xx, mbed)
platform target config section 19fbda3 36cfa7e change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 642569 642689 120 0.0
(read/write) 203664 203672 8 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197064 197072 8 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 930138 930133 -5 -0.0
.debug_aranges 87272 87272 0 0.0
.debug_frame 299764 299768 4 0.0
.debug_info 20249761 20250840 1079 0.0
.debug_line 2655140 2655389 249 0.0
.debug_loc 2795460 2795907 447 0.0
.debug_ranges 281592 281592 0 0.0
.debug_str 3018033 3018715 682 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 105817 105817 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 377761 377805 44 0.0
.symtab 256256 256256 0 0.0
.text 534628 534748 120 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2466856 2466984 128 0.0
.bss 215780 215788 8 0.0
.data 5880 5880 0 0.0
.text 1429500 1429628 128 0.0

* We were using "monotonic timestamp" as a synonym for "time since boot", but
  nothing actually guarantees that.  Switch to measuring time since server init
  for "time since boot".  This is the spec fix.
* Get rid of CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS.  Just always try the
  realtime clock before falling back on since-boot timestamps.  Since this might
  change which timestamps we use dynamically, make sure that our consecutive
  timestamps are in fact the same type when doing delta encoding.
* Improve tests to test both since-boot and realtime timestamps.
@bzbarsky-apple bzbarsky-apple force-pushed the event-management-fix-timing branch from 36cfa7e to 1f02c01 Compare February 23, 2023 05:37
@github-actions
Copy link

PR #25266: Size comparison from 7e728bc to 1f02c01

Increases (1 build for cc32xx)
platform target config section 7e728bc 1f02c01 change % change
cc32xx lock CC3235SF_LAUNCHXL (read only) 642569 642689 120 0.0
(read/write) 203664 203672 8 0.0
.bss 197064 197072 8 0.0
.debug_frame 299764 299768 4 0.0
.debug_info 20249763 20250842 1079 0.0
.debug_line 2655140 2655389 249 0.0
.debug_loc 2795460 2795907 447 0.0
.debug_str 3018033 3018715 682 0.0
.strtab 377761 377805 44 0.0
.text 534628 534748 120 0.0
Decreases (1 build for cc32xx)
platform target config section 7e728bc 1f02c01 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_abbrev 930138 930133 -5 -0.0
Full report (1 build for cc32xx)
platform target config section 7e728bc 1f02c01 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 642569 642689 120 0.0
(read/write) 203664 203672 8 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197064 197072 8 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 930138 930133 -5 -0.0
.debug_aranges 87272 87272 0 0.0
.debug_frame 299764 299768 4 0.0
.debug_info 20249763 20250842 1079 0.0
.debug_line 2655140 2655389 249 0.0
.debug_loc 2795460 2795907 447 0.0
.debug_ranges 281592 281592 0 0.0
.debug_str 3018033 3018715 682 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 105817 105817 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 377761 377805 44 0.0
.symtab 256256 256256 0 0.0
.text 534628 534748 120 0.0

@andy31415 andy31415 merged commit 7c77e8e into project-chip:master Feb 23, 2023
@bzbarsky-apple bzbarsky-apple deleted the event-management-fix-timing branch February 23, 2023 16:54
lecndav pushed a commit to lecndav/connectedhomeip that referenced this pull request Mar 22, 2023
* We were using "monotonic timestamp" as a synonym for "time since boot", but
  nothing actually guarantees that.  Switch to measuring time since server init
  for "time since boot".  This is the spec fix.
* Get rid of CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS.  Just always try the
  realtime clock before falling back on since-boot timestamps.  Since this might
  change which timestamps we use dynamically, make sure that our consecutive
  timestamps are in fact the same type when doing delta encoding.
* Improve tests to test both since-boot and realtime timestamps.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants