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

Don't panic when shutting down with controller and writing report #489

Merged
merged 2 commits into from
May 24, 2022

Conversation

jeremyandrews
Copy link
Member

@jeremyandrews jeremyandrews commented May 24, 2022

  • write report file in the same place that we display final metrics
  • don't store open file for duration of load test -- instead, test creation at test-start, then re-open to write report at end of test
  • closes Panic when shutting down via controller #474
  • adds test coverage, writing a report file when using the controller
  • validate report file is properly created and not-empty
  • cleanup report file at end of successful test

As part of this change, the last thing Goose reports now is where the report file has been written, immediately following the ASCII metrics:

 === OVERVIEW ===
 ------------------------------------------------------------------------------
 Action       Started               Stopped             Elapsed    Users
 ------------------------------------------------------------------------------
 Increasing:  2022-05-24 09:02:17 - 2022-05-24 09:02:19 (00:00:02, 0 -> 1)
 Increasing:  2022-05-24 09:02:19 - 2022-05-24 09:02:24 (00:00:05, 1 -> 5)
 Maintaining: 2022-05-24 09:02:24 - 2022-05-24 09:02:34 (00:00:10, 5)
 Increasing:  2022-05-24 09:02:34 - 2022-05-24 09:02:35 (00:00:01, 5 -> 20)
 Maintaining: 2022-05-24 09:02:35 - 2022-05-24 09:02:39 (00:00:04, 20)
 Decreasing:  2022-05-24 09:02:39 - 2022-05-24 09:02:45 (00:00:06, 1 <- 20)
 Increasing:  2022-05-24 09:02:45 - 2022-05-24 09:02:50 (00:00:05, 1 -> 20)
 Decreasing:  2022-05-24 09:02:50 - 2022-05-24 09:02:52 (00:00:02, 7 <- 20)
 Decreasing:  2022-05-24 09:02:52 - 2022-05-24 09:02:53 (00:00:01, 4 <- 7)
 Increasing:  2022-05-24 09:02:53 - 2022-05-24 09:02:59 (00:00:06, 4 -> 25)
 Decreasing:  2022-05-24 09:02:59 - 2022-05-24 09:03:36 (00:00:37, 0 <- 25)

 Target host: http://apache.fosciana/
 goose v0.16.3-dev
 ------------------------------------------------------------------------------
07:03:36 [INFO] html report file written to: report.html

@jeremyandrews jeremyandrews changed the title [WIP] Don't panic when shutting down with controller and writing report Don't panic when shutting down with controller and writing report May 24, 2022
Copy link
Collaborator

@slashrsm slashrsm left a comment

Choose a reason for hiding this comment

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

Reviewed and tested. I can confirm that the process exits without a panic when generating the report file.

@slashrsm slashrsm merged commit d5274ae into tag1consulting:main May 24, 2022
@jeremyandrews jeremyandrews deleted the shutdown-panic branch May 25, 2022 04:40
@jeremyandrews jeremyandrews mentioned this pull request Jul 17, 2022
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.

Panic when shutting down via controller
2 participants