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

Update nodejs examples #3555

Merged
merged 11 commits into from
Sep 13, 2024
Merged

Update nodejs examples #3555

merged 11 commits into from
Sep 13, 2024

Conversation

bryanhuhta
Copy link
Contributor

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.

@bryanhuhta bryanhuhta self-assigned this Sep 12, 2024
@bryanhuhta bryanhuhta requested a review from a team as a code owner September 12, 2024 17:15
Copy link
Contributor

@aleks-p aleks-p left a 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';
Copy link
Contributor

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

Copy link
Contributor Author

@bryanhuhta bryanhuhta Sep 13, 2024

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.

Copy link
Contributor

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.

@bryanhuhta bryanhuhta merged commit 8bd07ea into main Sep 13, 2024
18 checks passed
@bryanhuhta bryanhuhta deleted the update-nodejs-examples branch September 13, 2024 20:46
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.

2 participants