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

Update measure memory test #1363

Merged
merged 1 commit into from
Aug 20, 2024
Merged

Conversation

Danielius1922
Copy link
Member

Set high threshold for memory usage, we want the test succeed and only fail if the memory usage increases dramatically.

Copy link
Contributor

coderabbitai bot commented Aug 20, 2024

Walkthrough

The recent updates enhance memory configurations, introduce new parameters, and improve code clarity across the project. Memory measurement expectations have been increased for various resource setups to better align with anticipated usage. Additionally, a new cache expiration parameter for token verification was added to the API documentation, and variable naming in the JWT validator was refined for better readability, contributing to overall system robustness.

Changes

Files Change Summary
.github/workflows/measureMemory.yml Increased expectedRssInMb for multiple configurations, reflecting reassessed memory needs.
device-provisioning-service/README.md Added apis.http.authorization.tokenTrustVerification.cacheExpiration to enhance token security.
pkg/security/jwt/validator/validator.go Renamed opts to tokenIssuer in JWT validator for improved clarity; logic remains unchanged.
Makefile Introduced conditional MONGODB_ARGS for verbosity control based on TEST_MONGODB_VERBOSE.

Poem

🐇 In the code where rabbits hop,
Memory's needs begin to swap.
Tokens now keep watch and wait,
As clarity makes changes great!
With leaps of logic, we refine,
In the world of code, we shine! ✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 892d77f and 47288c5.

Files selected for processing (3)
  • .github/workflows/measureMemory.yml (2 hunks)
  • device-provisioning-service/README.md (1 hunks)
  • pkg/security/jwt/validator/validator.go (1 hunks)
Files skipped from review due to trivial changes (1)
  • pkg/security/jwt/validator/validator.go
Additional comments not posted (6)
.github/workflows/measureMemory.yml (5)

73-73: Increased memory threshold for low configurations.

The expectedRssInMb value has been increased from 50 to 100. This change aligns with the PR's objective to make the memory test more lenient.

Also applies to: 79-79, 85-85, 91-91, 97-97, 103-103, 109-109, 115-115


124-124: Increased memory threshold for 1000 device configurations.

The expectedRssInMb value has been increased from 145 to 250. This adjustment is consistent with the goal of accommodating higher memory usage.

Also applies to: 130-130, 136-136, 142-142, 148-148, 154-154, 160-160, 166-166


173-173: Increased memory threshold for 2500 device configurations.

The expectedRssInMb value has been increased from 210 to 350. This change is in line with the updated memory expectations.

Also applies to: 179-179, 185-185, 191-191, 197-197, 203-203, 209-209, 215-215


222-222: Increased memory threshold for 5000 device configurations.

The expectedRssInMb value has been increased from 320 to 500. This is part of the broader effort to adjust memory expectations.

Also applies to: 228-228, 234-234, 240-240, 246-246, 252-252, 258-258, 264-264


271-271: Increased memory threshold for 10000 device configurations.

The expectedRssInMb value has been increased from 530 to 800. This substantial increase reflects the need to accommodate higher memory usage.

Also applies to: 277-277, 283-283, 289-289, 295-295, 301-301, 307-307, 313-313

device-provisioning-service/README.md (1)

79-79: New configuration parameter for token cache expiration.

The apis.http.authorization.tokenTrustVerification.cacheExpiration parameter has been added, allowing control over token cache duration. This addition enhances security by managing token validity more effectively.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 47288c5 and 24ff2f8.

Files selected for processing (1)
  • Makefile (5 hunks)
Additional comments not posted (3)
Makefile (3)

42-46: Improved configuration flexibility with conditional verbosity.

The conditional assignment of MONGODB_ARGS based on TEST_MONGODB_VERBOSE enhances flexibility, allowing verbosity to be toggled easily.


211-212: Consistent verbosity configuration for MongoDB instances.

The use of MONGODB_ARGS in the RUN-DOCKER-MONGO function ensures consistent application of verbosity settings across MongoDB instances.


223-225: Aligned MongoDB targets with dynamic configuration approach.

The updates to mongo and mongo-no-replicas targets align with the dynamic configuration approach, utilizing MONGODB_ARGS for verbosity control.

Also applies to: 260-260

Set high threshold for memory usage, we want the test succeed and
only fail if the memory usage increases dramatically.
@Danielius1922 Danielius1922 force-pushed the adam/feature/fix-documentation branch from 24ff2f8 to 16ab5fa Compare August 20, 2024 12:49
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 24ff2f8 and 16ab5fa.

Files selected for processing (3)
  • .github/workflows/measureMemory.yml (2 hunks)
  • device-provisioning-service/README.md (1 hunks)
  • pkg/security/jwt/validator/validator.go (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • device-provisioning-service/README.md
  • pkg/security/jwt/validator/validator.go
Additional comments not posted (5)
.github/workflows/measureMemory.yml (5)

73-73: Approved: Increased memory threshold for 1 device, 1 resource, 16KB size.

The increase in expectedRssInMb from 50 to 100 aligns with the goal of reducing false negatives in memory tests.


79-79: Approved: Increased memory threshold for 1 device, 1 resource, 1KB size.

The increase in expectedRssInMb from 50 to 100 is in line with the objective to enhance test reliability.


85-85: Approved: Increased memory threshold for 1 device, 125 resources, 16KB size.

Raising expectedRssInMb from 50 to 100 helps in achieving a more lenient memory test.


91-91: Approved: Increased memory threshold for 1 device, 125 resources, 1KB size.

Increasing expectedRssInMb from 50 to 100 aligns with the PR's aim to improve test reliability.


307-307: Approved: Increased memory threshold for 10000 devices, 500 resources, 4KB size.

The increase in expectedRssInMb from 530 to 800 reflects a reassessment of memory requirements, supporting the PR's objective.

Copy link

@Danielius1922 Danielius1922 merged commit 171571d into main Aug 20, 2024
82 checks passed
@Danielius1922 Danielius1922 deleted the adam/feature/fix-documentation branch August 20, 2024 15:25
@coderabbitai coderabbitai bot mentioned this pull request Sep 16, 2024
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.

1 participant