Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Refactoring, context propagation, graceful stop #177

Merged
merged 4 commits into from
Jul 27, 2020
Merged

Conversation

axw
Copy link
Member

@axw axw commented Jul 27, 2020

There are various changes here, some of which are only tangentially related. The overall gist is:

  • simplification, e.g. removing unnecessary concurrency, which enabled removal of the deprecated heptio/workgroup
  • improved handling of interrupt signals, cancelling the entire process rather than just the active benchmark
  • addition of graceful stopping of non-benchmark workloads

Closes #160

axw added 4 commits July 27, 2020 09:51
 - remove "throttle", use time.Ticker channel directly
 - simplify worker.flush by using context
 - create spans directly, rather than in a short lived
   goroutine which is waited upon:
Sending events should be fast enough that
there's no need for parallelism, and the
concurrency is complicating things.
Add "With" methods to Input directly,
for simpler and more idiomatic code.
Previously, interrupt (Ctrl+C) would not be
handled well. e.g. while running benchmarks,
benchmarks would continue to run, and you
would need to interrupt every individual
benchmark.

With these changes we abort all benchmarks
upon interrupt, as they would no longer be
useful for comparisons. Non-benchmark load
generation is gracefully stopped, and stats
gathered per usual without error.
@apmmachine
Copy link

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #177 opened]

  • Start Time: 2020-07-27T04:19:23.113+0000

  • Duration: 3 min 27 sec

Test stats 🧪

Test Results
Failed 0
Passed 9
Skipped 0
Total 9

@axw axw merged commit e19c4eb into elastic:master Jul 27, 2020
@axw axw deleted the refactoring branch July 27, 2020 04:24
v1v added a commit to v1v/hey-apm that referenced this pull request Dec 17, 2021
* upstream/main: (37 commits)
  Update to assume use of data streams (elastic#198)
  JJBB: disable periodic trigger (elastic#195)
  es: only count workload events (elastic#193)
  Use specific docker compose context (elastic#191)
  define failure threshould from average instead of max (elastic#190)
  update go agent version (elastic#189)
  Add destination service to spans (elastic#188)
  worker: reinstate Events{Generated,Sent,Indexed} (elastic#187)
  Remove types, conv, strcoll packages (elastic#185)
  agent/tracer cleanup (elastic#184)
  Stop storing derived metrics (elastic#183)
  Wait for active output events before proceeding (elastic#181)
  worker: send spans in a separate goroutine (elastic#180)
  benchmark: drop duplicate benchmark (elastic#179)
  Refactoring, context propagation, graceful stop (elastic#177)
  Keep self instrumentation (elastic#174)
  Disable apm-server instrumentation (elastic#173)
  Upgrade go version and dependencies (elastic#172)
  Allow configuring multiple worker instances (elastic#171)
  Adds a nil check before querying libbeat metrics. (elastic#169)
  ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace contour dependency
2 participants