-
Notifications
You must be signed in to change notification settings - Fork 621
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
Update nodejs examples #3555
Update nodejs examples #3555
Conversation
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.
LGTM. The tinyhttp example is a great addition!
@@ -0,0 +1,18 @@ | |||
import { check } from 'k6'; |
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.
is this referenced anywhere or just a helper to verify things? I see we have one in the nodejs
folder as well
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 accidentally committed two of these scripts. I removed one in 316666d. I used this to quickly apply load to a locally running example.
The Python load generator is nice for the Docker Compose examples because it runs its load continuously, but it requires more configuration. This k6 script is nice for testing an example that is running locally without having to spin up the Python load generator. Instead, a quick
k6 run load.js
command will start sending load to a local instance.
I've wanted to move all our examples over to using k6 as a load generator but haven't found time to experiment.
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.
Makes sense and yeah, replacing them with k6 eventually would be nice.
With the release of https://github.com/grafana/pyroscope-nodejs/releases/tag/v0.4.0, we need to update all the nodejs sdk examples. This PR does that and also refactors all of them to make them easier to start.