-
Notifications
You must be signed in to change notification settings - Fork 0
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
Apply updates suggested in PR comment #1
Apply updates suggested in PR comment #1
Conversation
@@ -3,5 +3,5 @@ | |||
const execSync = require('child_process').execSync; | |||
const exec = cmd => execSync(cmd, { stdio: [0, 1, 2] }); | |||
|
|||
exec('node benchmark/tracer'); | |||
exec('node benchmark/propagator'); | |||
exec('node benchmark/tracer.js'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes the issue oliver was talking about
@@ -1,7 +1,7 @@ | |||
'use strict'; | |||
|
|||
const benchmark = require('./benchmark'); | |||
const opentelemetry = require('@opentelemetry/core'); | |||
const opentelemetry = require('../packages/opentelemetry-core'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Loading by filepath removes dependency management issues and ensures you're testing the current checked out branch
@@ -26,7 +26,7 @@ const setups = [ | |||
for (const setup of setups) { | |||
console.log(`Beginning ${setup.name} Benchmark...`); | |||
const propagator = setup.propagator; | |||
const suite = benchmark() | |||
const suite = benchmark(100) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formatters are fast so we can run them more times
|
||
const exporter = new InMemorySpanExporter(); | ||
const logger = new opentelemetry.NoopLogger(); | ||
|
||
const setups = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these setups make more sense since Basic and Node TracerRegistries return the same Tracer class so their performance should be identical.
registry: getRegistry(new BatchSpanProcessor(new InMemorySpanExporter())) | ||
}, | ||
{ | ||
name: 'NoopTracerRegistry', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a noop as a baseline
const tracer = registry.getTracer("benchmark"); | ||
const suite = benchmark() | ||
const tracer = setup.registry.getTracer("benchmark"); | ||
const suite = benchmark(20) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tracer tests run slower so I did fewer runs. feel free to tweak it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes, overall lgtm. I am fine with the current sample numbers, we can tweak it as per the need in the future. Also, I liked the idea of running benchmark of the currently checked out branch. 👍
Making this into your branch so you can see what you think.