Skip to content

Conversation

@CongkaiTan
Copy link
Contributor

Issue

Mirroring internal CR 217619824

Description

  • Change runtime JS loading (through std::fs::read_to_string) back to compile-time loading (through include_directory!). This bug caused previously built binary to not able to load the JS files and include them in the report (unless it's running in the build environment where the JS files present)
  • Handle all cases when the binary data file is empty (possibly due to incomplete recording), including those that uses custom parser. The current logic caused report generations to fail with errors:
      thread 'main' panicked at src/data/aperf_stats.rs:140:34:
      index out of bounds: the len is 0 but the index is 0
    

when the aperf_stats data are not written to the binary file. A new unit test was added to cover this case.

Tests

Built the binary with musl and tested it on another machine. Verified that the report was correctly generated.

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 marked this pull request as ready for review August 27, 2025 22:32
@CongkaiTan CongkaiTan requested a review from a team as a code owner August 27, 2025 22:32
@CongkaiTan CongkaiTan merged commit 4a5fa77 into aws:main Aug 28, 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.

3 participants