Skip to content

Conversation

@CongkaiTan
Copy link
Contributor

Issue

Mirroring internal CR 208912038

Description

This change contains refactors to improve code reuse and clean up the logical flow. Specifically, it:

  • updates the data! and processed_data! macro to define the function to instantiate all the data structs for record/report and add them to PerformanceData/VisualizationData, which allows us to
    • remove the ctor static functions defined in each data module that have same implementation
    • have a centralized place to collect all data names and register all the data structs (which pave the way for the skip-data feature)
    • have a simpler flow where only the needed data are initialized, instead of initializing all of them (which has side effects) and then removing unwanted ones based on user input
    • remove the lock wrapped around the PerformanceData and VisualizationData objects, which incurs extra costs, since now everything is deterministically sequential
  • Consolidate the naming mechanism of all data. Now we have data name = rust module name = rust file name = js file name (through get_data_name_from_type<T>). This pattern benefits from Rust's design where the module definition resides in the file with the same name, and hence eliminates the need to explicitly and redundantly defines a name for a data.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@CongkaiTan CongkaiTan requested a review from a team as a code owner August 19, 2025 00:17
@CongkaiTan CongkaiTan force-pushed the main branch 3 times, most recently from 2b32bb2 to 21ffd73 Compare August 19, 2025 04:42
@CongkaiTan CongkaiTan merged commit 1be496a into aws:main Aug 20, 2025
6 checks passed
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.

2 participants