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

feat: add rust memory reader #162

Closed
wants to merge 18 commits into from

Conversation

TheEZIC
Copy link

@TheEZIC TheEZIC commented Jul 8, 2024

  • Migrate memory reader to rust lang;
  • Create an abstraction under memory reading in tosu package;
  • Replace PROCESS_POWER_THROTTLING_IGNORE_TIMER_RESOLUTION constant with it's value because my compiler can't find this variable somehow and fails building;
  • Install @types/adm-zip to @tosu/common package as dev dependency.

Not supported methods yet:

  • disablePowerThrottling;
  • getProcesses;
  • scanSync;
  • scan;
  • scanAsync

@cyperdark cyperdark marked this pull request as ready for review July 10, 2024 07:34
@cyperdark cyperdark marked this pull request as draft July 10, 2024 07:34
@cyperdark cyperdark force-pushed the rust-memory-reader branch 2 times, most recently from a3acd8b to 1db02a6 Compare July 10, 2024 08:59
@TheEZIC TheEZIC marked this pull request as ready for review July 10, 2024 11:21
Copy link
Member

@KotRikD KotRikD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. conflicts
  2. @cyperdark can you perform performance test (and leak check if possible)?

@TheEZIC TheEZIC force-pushed the rust-memory-reader branch from 8a4ef61 to 9d5a8e7 Compare July 10, 2024 21:26
@TheEZIC
Copy link
Author

TheEZIC commented Jul 10, 2024

fixed

@TheEZIC
Copy link
Author

TheEZIC commented Jul 10, 2024

If you want I can try to add memory reader engine select into setting

@cyperdark cyperdark force-pushed the rust-memory-reader branch from 9d5a8e7 to c7ce778 Compare July 14, 2024 07:46
@cyperdark cyperdark force-pushed the rust-memory-reader branch from c7ce778 to 29d2ca1 Compare July 14, 2024 12:31
@TheEZIC
Copy link
Author

TheEZIC commented Jul 15, 2024

I found one bug with big addresses which above i32::MAX when passing them from JS to Rust. Rust casts them as i32::max

Here is how CPP casts
image

Here is how Rust casts
image

@cyperdark
Copy link
Collaborator

cyperdark commented Jul 15, 2024

At this current state it's slower, need more precise tests to determine if it's faster/same or slower
reported to dms

timings parser: https://github.com/cyperdark/tosu-timings-parser
p.s. Making it draft for now

1721031314_0ncAj4oUvc
1721031311_txWUwVIFfW
1721031308_3lP8DnfqBF
1721031305_IXhkQywXw9
1721031289_bHZtDQ4dEL
1721031283_0KSx9nj4Vb
1721031280_BOh3KKHQZE
1721031275_zI3cbyHZ02
1721031263_Hjya5VIP40

@cyperdark cyperdark marked this pull request as draft July 15, 2024 08:23
@TheEZIC
Copy link
Author

TheEZIC commented Jul 15, 2024

Here is my benchmarks on same maps:

rust.txt
cpp.txt

@KotRikD KotRikD closed this Aug 5, 2024
@TheEZIC
Copy link
Author

TheEZIC commented Aug 6, 2024

RIP

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