Skip to content

Conversation

@caspervonb
Copy link
Collaborator

No description provided.

@caspervonb caspervonb requested a review from Jarema May 17, 2023 09:20
@caspervonb caspervonb force-pushed the benchmark-dont-panic-on-server-close branch from 3b8d39f to 0e17d5b Compare May 17, 2023 09:24
nc.publish("bench".to_string(), msg.clone().into())
.await
.unwrap();
let result =
Copy link
Member

Choose a reason for hiding this comment

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

Maybe better directly check for disconnect event on the client and the break the loop, log publish errors (but not panic)?

The benchmark results and report would be cleaner about what happened.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So about printing the error, I don't want to give the impression that the benchmark failed when its expected (albeit racy behavior).

Could instead just loop from 0 to N and still unwrap.

Copy link
Member

Choose a reason for hiding this comment

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

I get your point and agree with it.
I'm talking about maybe having more graceful and controlled shutdown of server/clients in benchmarks.

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.

2 participants