(PDB-5691) benchmark: space out command types #3880
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To alleviate the certname row contention, this replaces the pipeline that sends each command separately to the submission pipeline with a go-loop that schedules the sending of catalogs and reports at a later time (5-15 seconds delay for each). This should more accurately simulate the actual behavior and allow more realistic performance testing.
Every command runs scf-storage/maybe-activate-node! which causes contention on the certname row when multiple commands of the same certname are processed simultaneously. Previously we generated a set of commands for a certname and submitted them all at once, so there was contention on most submissions from benchmark. This is not reflective of reality because a catalog is delayed by the time it takes puppetserver to compile the node's catalog after receiving the factset, and the report is delayed after catalog compilation by the time it takes the agent to apply it.