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

HTML report file when using Gaggle #426

Open
bellackn opened this issue Mar 28, 2022 · 7 comments
Open

HTML report file when using Gaggle #426

bellackn opened this issue Mar 28, 2022 · 7 comments

Comments

@bellackn
Copy link

bellackn commented Mar 28, 2022

How would I generate an HTML report when using a manager node and multiple workers? Is this even possible?

  • The manager doesn't accept the --report-file flag
  • The worker does, but after a loadtest finishes (either Ctrl-C or via --run-time), it throws this error:
thread 'main' panicked at 'internal error: entered unreachable code', C:\Users\nbellack\.cargo\registry\src\github.com-1ecc6299db9ec823\goose-0.15.2\src\metrics.rs:2189:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\debug\loadtesting.exe --worker` (exit code: 101)
@slashrsm
Copy link
Collaborator

I can confirm that I am getting the same error. Will investigate....

@slashrsm
Copy link
Collaborator

With #427 I can use --report-file on manager and I see the report file being generated at the end of the load test.

@bellackn Would you mind testing that branch?

@bellackn
Copy link
Author

bellackn commented Mar 29, 2022

Thanks @slashrsm, the error is gone. However, new problems occur with your branch:

  • the report file data tables remain empty, although the graphs show the requests correctly
  • the worker process doesn't show any metrics when finished

Also, maybe this is unrelated, but this branch doesn't work with goose_eggs. Will update the comment with details.

@slashrsm
Copy link
Collaborator

It turns out that manager won't write the report (which is what I expected), but the workers will (they seem to inherit the report file configuration from the manager).

I think that the correct way to solve this would be to allow --report-file on both managers and workers. Each would then respect only what was set locally, not what workers got from managers for example.

the worker process doesn't show any metrics when finished

I see the metrics printed on the manager and workers. I started the test with these options

manager:

--manager --expect-workers 2  --host http://localhost -u10 -t10s -s2s --report-file report.html

worker:

--worker

Could you share your run configuration?

@bellackn
Copy link
Author

You're right, the metrics show up correctly. I ran the tests for a too short amount of time and also had a random waiting time built in. So, works as expected, thanks!

However, I have already teased that the branch doesn't work with goose_eggs anymore. My code:

use goose::prelude::*;
use goose_eggs::{validate_and_load_static_assets, Validate};

#[tokio::main]
async fn main() -> Result<(), GooseError> {
    GooseAttack::initialize()?
        .register_taskset(
            taskset!("WebsiteUser")
                .register_task(task!(load_index)),
        )
        .execute()
        .await?
        .print();

    Ok(())
}

/// Load the start page and all associated static assets
async fn load_index(user: &mut GooseUser) -> GooseTaskResult {
    let goose = user.get("/").await?;
    validate_and_load_static_assets(
        user,
        goose,
        // Validate title and other arbitrary text on the response HTML
        &Validate::builder()
            .title("foo")
            .build(),
    )
    .await?;

    Ok(())
}

The error:

error[E0308]: mismatched types
  --> src\main.rs:28:9
   |
28 |         user,
   |         ^^^^ expected struct `goose::goose::GooseUser`, found a different struct `goose::goose::GooseUser`
   |
   = note: expected mutable reference `&mut goose::goose::GooseUser` (struct `goose::goose::GooseUser`)
              found mutable reference `&mut goose::goose::GooseUser` (struct `goose::goose::GooseUser`)
   = note: perhaps two different versions of crate `goose` are being used?

Not related to the HTML report at all, but this works with goose v0.15.2 and not on your fork branch.

@ActivePeter
Copy link

Is it solved? In which release was it merged?

@jeremyandrews
Copy link
Member

Unfortunately this is still a lingering bug. And the current release of Goose also currently doesn't support Gaggles, the functionality still needs to be added back: #548

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 a pull request may close this issue.

4 participants