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

Adds extra env var for memory prof #33

Closed

Conversation

helio-frota
Copy link
Contributor

@helio-frota helio-frota commented Oct 17, 2024

  • That extra env var is for a specific case with graphql and no auth
  • Adds remaining tests
  • Adds step by step doc

Closes #31

@helio-frota helio-frota marked this pull request as draft October 17, 2024 16:42
@helio-frota helio-frota marked this pull request as ready for review October 17, 2024 19:15
@helio-frota helio-frota requested a review from ctron October 18, 2024 11:44
* That extra env var is for a specific case with graphql and no auth
* Adds remaining tests
* Adds step by step doc
.execute()
.await?;

if !mem_prof {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason why we need to do this here ?

Copy link
Contributor

Choose a reason for hiding this comment

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

if this is about turning on or off auth, because for some reason it interferes with memory profiling why not switch it there ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for the review
because I'm avoiding the required env_vars

let issuer_url = std::env::var("ISSUER_URL").context("Missing env-var 'ISSUER_URL'")?;
let client_id = std::env::var("CLIENT_ID").context("Missing env-var 'CLIENT_ID'")?;
let client_secret = std::env::var("CLIENT_SECRET").context("Missing env-var 'CLIENT_SECRET'")?;

and avoiding to hit this .register_transaction(custom_client.clone().set_name("logon"))

}

pub async fn g_get_advisory_by_id(user: &mut GooseUser) -> TransactionResult {
let body = r#"{ "query": "{ getAdvisoryById(id: \"37292820-00ee-4299-8097-a11f8348bdf8\") { id title }}" }"#;
Copy link
Contributor

@JimFuller-RedHat JimFuller-RedHat Oct 21, 2024

Choose a reason for hiding this comment

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

Is this intentionally a negative test eg. I would have thought uuid are not guaranteed ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see your point here, but I'm assuming the dump.sql content will continue the same as we have a step-by-step doc for this.

@@ -0,0 +1,57 @@
# graphql memory profiling with heaptrack and disabled auth
Copy link
Contributor

Choose a reason for hiding this comment

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

is this not memory profiling for everything ... why specific instructions for graphql ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

is this not memory profiling for everything

that's correct 👍

why specific instructions for graphql ?

This test was to help with this investigation only trustification/trustify#750

Copy link
Contributor Author

@helio-frota helio-frota Oct 21, 2024

Choose a reason for hiding this comment

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

I start to agree that we are not required to land the PR.. Adding a test for something that tends to be transient
I'm thinking in a way to have a handy graphql-specific-mem-prof-only.
🤔 even if we close the PR the register will continue here so we can replicate

@helio-frota helio-frota deleted the mem-prof-graphql branch October 21, 2024 10:53
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.

Can we have another binary or something with auth disabled ?
2 participants