File tree Expand file tree Collapse file tree 7 files changed +1563
-3
lines changed Expand file tree Collapse file tree 7 files changed +1563
-3
lines changed Original file line number Diff line number Diff line change 1515.aws-sam
1616out.txt
1717
18- hello-world
19- ! hello-world /main.go
18+ examples /go
19+ ! examples /go /main.go
20+
21+ node_modules
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ You can run the extension in dev mode. It will not register the extension.
5353
5454It's useful to test the relay server initialization.
5555Keep in mind there's no lambda execution, therefore to test data is being relayed correctly you need
56- to ingest manually.
56+ to ingest manually (hitting ` http://localhost:4040/ingest ` ) .
5757
5858` PYROSCOPE_DEV_MODE=true go run main.go `
5959
@@ -92,3 +92,8 @@ aws lambda publish-layer-version \
9292 --region=$YOUR_REGION \
9393 --zip-file " fileb://extension.zip"
9494```
95+
96+ # Publishing
97+ ```
98+ deno run --allow-env --allow-read --allow-run scripts/publish.ts --name=pyroscope-extension --dry-run=false
99+ ```
File renamed without changes.
Original file line number Diff line number Diff line change 1+ nodejs 16.16.0
Original file line number Diff line number Diff line change 1+ const Pyroscope = require ( "@pyroscope/nodejs" ) ;
2+
3+ Pyroscope . init ( {
4+ serverAddress : "http://localhost:4040" ,
5+ appName : "my-node-service" ,
6+ } ) ;
7+ Pyroscope . start ( ) ;
8+
9+ function doWork ( number ) {
10+ for ( let i = 0 ; i < number ; i ++ ) { }
11+ }
12+
13+ exports . handler = async ( event , context ) => {
14+ try {
15+ response = {
16+ "statusCode" : 200 ,
17+ "body" : JSON . stringify ( {
18+ message : "hello world" ,
19+ } ) ,
20+ } ;
21+ } catch ( err ) {
22+ console . log ( err ) ;
23+ return err ;
24+ }
25+
26+ doWork ( 99999999 ) ;
27+ doWork ( 99999999 ) ;
28+
29+ return response ;
30+ } ;
You can’t perform that action at this time.
0 commit comments