tag1consulting / goose

Load testing framework, inspired by Locust
https://tag1.com/goose
Apache License 2.0
809 stars 70 forks source link

No summary when test is finished #374

Closed huwwynnjones closed 3 years ago

huwwynnjones commented 3 years ago

hello I am running a load test. I get the metrics output when the users are hatched, but once the load test finishes the final summary output is not showing up.

[xxx@localhost goose_test]$ cargo run --release -- --running-metrics 2 Finished release [optimized] target(s) in 0.08s Runningtarget/release/goose_test --running-metrics 2`

=== PER TASK METRICS ===

Name | # times run | # fails | task/s | fail/s

1: LoadTest | 1: | 0 | 0 (0%) | 0.00 | 0.00

Name | Avg (ms) | Min | Max | Median

1: LoadTest | 1: | 0.00 | 0 | 0 | 0

Name | Status codes

-------------------------+---------------------------------------------------- Aggregated |

All 8 users hatched, resetting metrics (disable with --no-reset-metrics).

[xxx@localhost goose_test]$ `

I have this setup:

.set_default(GooseDefault::RunTime, 30)? .set_default(GooseDefault::Host, HOST)? .set_default(GooseDefault::ThrottleRequests, 5)? .set_default(GooseDefault::StatusCodes, true)?

Thanks

jeremyandrews commented 3 years ago

Is it possible to include a complete minimal code example to duplicate this? I am unable to duplicate based on what you have provided.

Be sure when you invoke GooseAttack that it ends with .print();, such as from the Goose Book example:

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

    Ok(())
}
huwwynnjones commented 3 years ago

Thanks for replying. Your guess is correct, I had missed adding .print(). Thanks