Skip to content

Commit

Permalink
Merge pull request #3438 from Unitech/v8_option
Browse files Browse the repository at this point in the history
feat: allow pm2 to enable v8 data collecting from pmx
  • Loading branch information
wallet77 committed Jan 31, 2018
2 parents 1a6771a + 757562f commit e46b15d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions bin/pm2
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ commander.version(pkg.version)
.option('--disable-trace', 'disable transaction tracing with km')
.option('--attach', 'attach logging after your start/restart/stop/reload')
.option('--sort <field_name:sort>', 'sort process according to field\'s name')
.option('--v8', 'enable v8 data collecting')
.usage('[cmd] app');

commander.on('--help', function() {
Expand Down
5 changes: 5 additions & 0 deletions lib/API/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@
"boolean"
]
},
"v8": {
"type": [
"boolean"
]
},
"increment_var": {
"type": "string"
},
Expand Down
3 changes: 2 additions & 1 deletion lib/ProcessContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ delete process.env.pm2_env;
if (process.env.pmx !== 'false')
require('pmx').init({
transactions: process.env.km_link == 'true' && process.env.trace == 'true' || false,
http: process.env.km_link == 'true' || false
http: process.env.km_link == 'true' || false,
v8: process.env.v8 === 'true' || false
});

var stdFile = pm2_env.pm_log_path;
Expand Down

0 comments on commit e46b15d

Please sign in to comment.