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

Add additional graphs to the HTML report #394

Merged
merged 23 commits into from
Dec 13, 2021
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
8821e12
#246: Add errors per second graph to the HTML report.
slashrsm Nov 24, 2021
b8abce3
#246: Add average request time graph to the HTML report.
slashrsm Nov 24, 2021
05a6eb4
#246: Add active users graph to the HTML report.
slashrsm Nov 24, 2021
9494a35
#246: Add active tasks graph to the HTML report.
slashrsm Nov 24, 2021
3e9fe17
#246: Update CHANGELOG.md.
slashrsm Nov 24, 2021
d7c72fb
#246: Move graphs in the relevant sections.
slashrsm Dec 6, 2021
02347cd
#246: Change type of GooseMetrics::users_per_second to usize.
slashrsm Dec 6, 2021
682fbdf
#246: Add more comments.
slashrsm Dec 6, 2021
7c3edac
#246: Use GooseRequestMetric::success to determine if there was an er…
slashrsm Dec 7, 2021
7d827a9
#246: Collect user and task metrics in GooseAttack::sync_metrics().
slashrsm Dec 7, 2021
3af369d
#246: Add MovingAverage struct.
slashrsm Dec 7, 2021
d944a5d
#246: Change type of GooseMetrics::tasks_per_second to usize.
slashrsm Dec 7, 2021
bc80b91
#246 and #386: Send the actual time of the request with the GooseRequ…
slashrsm Dec 8, 2021
dd542b6
#246: Use GooseRequestMetric::elapsed to calculate which second on th…
slashrsm Dec 9, 2021
70500a0
#246: Revert out of scope change.
slashrsm Dec 9, 2021
499a084
#246: Use GooseTaskMetric::elapsed to aggregate data for users/tasks …
slashrsm Dec 9, 2021
6f96383
#246: Remove uneeded logic that fills task/users per second vectors.
slashrsm Dec 9, 2021
8079d0d
#246: Improve function docs.
slashrsm Dec 9, 2021
834fd46
#246: Move the users graph into its own section.
slashrsm Dec 10, 2021
0cf043e
#246: Change tasks per second graph to display number of tasks that w…
slashrsm Dec 11, 2021
f4bae2c
#246: Remove unecessary change to the import from util.
slashrsm Dec 12, 2021
303787f
#246: Fix comments.
slashrsm Dec 12, 2021
9a2f685
#246: Introduce graph struct.
slashrsm Dec 12, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
#246: Collect user and task metrics in GooseAttack::sync_metrics().
  • Loading branch information
slashrsm committed Dec 8, 2021
commit 7d827a96613e52e454be88af81295d9bfdc9876b
15 changes: 9 additions & 6 deletions src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2395,6 +2395,15 @@ impl GooseAttack {
}
}

// Record current users and tasks for users/tasks per second graph in HTML report.
if self.attack_mode != AttackMode::Worker {
let mut tasks = 0;
for set in self.task_sets.iter() {
tasks += set.tasks.len();
}
self.metrics.record_users_tasks_per_second(tasks as u32);
}

// Load messages from user threads until the receiver queue is empty.
let received_message = self.receive_metrics(goose_attack_run_state, flush).await?;

Expand Down Expand Up @@ -2563,12 +2572,6 @@ impl GooseAttack {
let mut received_message = false;
let mut message = goose_attack_run_state.metrics_rx.try_recv();

let mut tasks = 0;
for set in self.task_sets.iter() {
tasks += set.tasks.len();
}
self.metrics.record_users_tasks_per_second(tasks as u32);

// Main loop wakes up every 500ms, so don't spend more than 400ms receiving metrics.
let receive_timeout = 400;
let receive_started = std::time::Instant::now();
Expand Down