From 8e66aca75b2258b26a4591465fb2d71a487ac089 Mon Sep 17 00:00:00 2001 From: Rafael Gonzaga Date: Wed, 15 Mar 2023 17:22:50 -0300 Subject: [PATCH] feat: accept --name argument (#399) --- README.md | 1 + bin.js | 15 ++++++++++----- docs/clinic-bubbleprof.txt | 1 + docs/clinic-doctor.txt | 1 + docs/clinic-flame.txt | 1 + docs/clinic-heap-profiler.txt | 1 + 6 files changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 59c0416..9fba640 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,7 @@ clinic heapprofiler --help --autocannon Run the autocannon benchmarking tool when the server starts listening on a port. --dest Destination for the collect data (default .). --stop-delay Add a delay to close the process when a job is done through either `autocannon` or `on-port` flag (milliseconds) +--name The --name flag sets a name for the output data, allowing you to replace existing reports without generating new ones. Example: .clinic/node-19-test.clinic-flame ``` ## Programmable Interfaces diff --git a/bin.js b/bin.js index 296dfbf..b324244 100755 --- a/bin.js +++ b/bin.js @@ -77,7 +77,8 @@ const result = commist() 'sample-interval', 'on-port', 'dest', - 'stop-delay' + 'stop-delay', + 'name' ], default: { 'sample-interval': '10', @@ -119,7 +120,8 @@ const result = commist() string: [ 'visualize-only', 'dest', - 'stop-delay' + 'stop-delay', + 'name' ], default: { open: true, @@ -161,7 +163,8 @@ const result = commist() string: [ 'visualize-only', 'dest', - 'stop-delay' + 'stop-delay', + 'name' ], default: { open: true, @@ -202,7 +205,8 @@ const result = commist() string: [ 'visualize-only', 'dest', - 'stop-delay' + 'stop-delay', + 'name' ], default: { open: true, @@ -323,7 +327,8 @@ async function runTool (toolName, Tool, version, args, uiOptions) { detectPort: !!onPort, dest: args.dest, debug: args.debug, - kernelTracing: args['kernel-tracing'] + kernelTracing: args['kernel-tracing'], + name: args.name }) const stopDelayMs = parseInt(args['stop-delay']) diff --git a/docs/clinic-bubbleprof.txt b/docs/clinic-bubbleprof.txt index 7ccac01..1391b26 100644 --- a/docs/clinic-bubbleprof.txt +++ b/docs/clinic-bubbleprof.txt @@ -42,3 +42,4 @@ --open Boolean to enable or disable your report opening in your web browser. --dest Destination for the collected data (default .clinic/). --stop-delay Add a delay to close the process when a job is done through either `autocannon` or `on-port` flag (milliseconds) + --name The --name flag sets a name for the output data, allowing you to replace existing reports without generating new ones. Example: .clinic/node-19-test.clinic-flame diff --git a/docs/clinic-doctor.txt b/docs/clinic-doctor.txt index e7b33de..de677f2 100644 --- a/docs/clinic-doctor.txt +++ b/docs/clinic-doctor.txt @@ -45,3 +45,4 @@ --open Boolean to enable or disable your report opening in your web browser. --dest Destination for the collected data (default .clinic/). --stop-delay Add a delay to close the process when a job is done through either `autocannon` or `on-port` flag (milliseconds) + --name The --name flag sets a name for the output data, allowing you to replace existing reports without generating new ones. Example: .clinic/node-19-test.clinic-flame diff --git a/docs/clinic-flame.txt b/docs/clinic-flame.txt index 1b7aab2..18e4651 100644 --- a/docs/clinic-flame.txt +++ b/docs/clinic-flame.txt @@ -51,3 +51,4 @@ --dest Destination for the collected data (default .clinic/). --kernel-tracing Profile application using linux_perf (linux only). --stop-delay Add a delay to close the process when a job is done through either `autocannon` or `on-port` flag (milliseconds) + --name The --name flag sets a name for the output data, allowing you to replace existing reports without generating new ones. Example: .clinic/node-19-test.clinic-flame diff --git a/docs/clinic-heap-profiler.txt b/docs/clinic-heap-profiler.txt index 4d7e5a4..6acd058 100644 --- a/docs/clinic-heap-profiler.txt +++ b/docs/clinic-heap-profiler.txt @@ -44,3 +44,4 @@ --open Boolean to enable or disable your report opening in your web browser. --dest Destination for the collected data (default .clinic/). --stop-delay Add a delay to close the process when a job is done through either `autocannon` or `on-port` flag (milliseconds) + --name The --name flag sets a name for the output data, allowing you to replace existing reports without generating new ones. Example: .clinic/node-19-test.clinic-flame