Skip to content

Load testing reference management #669

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

Closed
6 tasks
mahesh-hegde opened this issue Apr 12, 2023 · 0 comments · Fixed by dart-archive/jnigen#264
Closed
6 tasks

Load testing reference management #669

mahesh-hegde opened this issue Apr 12, 2023 · 0 comments · Fixed by dart-archive/jnigen#264

Comments

@mahesh-hegde
Copy link
Contributor

mahesh-hegde commented Apr 12, 2023

We need to load test a few scenarios to get a certainty that resource management is proper.

These tests should be done with generated bindings, and if possible, with the support library.

  • Test large number of JNI references without freeing.

    • Keep references in list to prevent NativeFinalizer from kicking off.
    • There's a limit imposed by the JNI itself. However, a normal app should be able to sustain global ref count of low 1000s.
  • Test large number of JNI calls with scoped reference management:

    • Possibly in 10K - 100K calls wrapped in arena calls.
  • Verify a call returning primitive type does not create any JNI references.

  • Verify that class references are being cached.

  • Verify native finalizers are being invoked after a forced GC, and that JNI references are actually being freed.

  • Verify a reference is not inadvertently deleted with passage of time.

    • Keep a reference for 10 seconds, in the middle force-execute GC, then use it again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant