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 tracegen utility for generating traces #1245

Merged
merged 5 commits into from
Jan 17, 2019

Conversation

yurishkuro
Copy link
Member

Small utility used to generate continuous stream of simple spans, useful for stress testing.

@codecov
Copy link

codecov bot commented Dec 12, 2018

Codecov Report

Merging #1245 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1245   +/-   ##
======================================
  Coverage     100%    100%           
======================================
  Files         161     161           
  Lines        7198    7198           
======================================
  Hits         7198    7198

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bda811b...cf2380e. Read the comment docs.

fs.IntVar(&c.Workers, "workers", 1, "Number of workers (goroutines) to run")
fs.IntVar(&c.Traces, "traces", 1, "Number of traces to generate in each worker (ignored if duration is provided")
fs.BoolVar(&c.Marshall, "marshall", false, "Whether to marshall trace context via HTTP headers")
fs.BoolVar(&c.Debug, "debug", false, "Whether to set DEBUG flag on the spans to prevent downsampling")
Copy link
Contributor

Choose a reason for hiding this comment

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

downsampling is not a thing in OSS

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps "force sampling" makes more sense?

child.Finish()
sp.Finish()
} else {
opt := opentracing.FinishOptions{FinishTime: time.Now().Add(123 * time.Microsecond)}
Copy link
Contributor

Choose a reason for hiding this comment

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

what's the magic number?

type worker struct {
id int // worker id
traces int // how many traces the worker has to generate (only when duration==0)
marshall bool // whether the worker needs to marshall trace context via HTTP headers
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure why this is necessary for a tracegen tool

Copy link
Contributor

Choose a reason for hiding this comment

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

BTW marshall is used in various places in Jaeger code and I believe it is a typo. Marshal is the correct spelling AFAIK.

Yuri Shkuro added 4 commits January 17, 2019 13:02
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
@@ -0,0 +1 @@
Test utility
Copy link
Member Author

Choose a reason for hiding this comment

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

per offline discussion, this is worth merging even though it doesn't have tests (it is itself a test utility).

Signed-off-by: Yuri Shkuro <[email protected]>
@yurishkuro yurishkuro merged commit 48b034c into jaegertracing:master Jan 17, 2019
@ghost ghost removed the review label Jan 17, 2019
@yurishkuro yurishkuro changed the title Add tracegen Add tracegen utility for generating traces Jan 17, 2019
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.

4 participants