-
Notifications
You must be signed in to change notification settings - Fork 130
WIP: -p/--profile option starts v8/chromium/chrome compatible profiling. #485
base: master
Are you sure you want to change the base?
Conversation
This should help fixing things like #483. |
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.
Have not tested it yet. Just a few remarks.
.options('q', {alias:'quiet', boolean:true, default:false, describe:'Do not output any warnings'}) | ||
.options('ppi', {describe:'Pixels per inch used to convert m, mm, cm, in, pt, pc to pixels', default:90.714}); | ||
.options('ppi', {describe:'Pixels per inch used to convert m, mm, cm, in, pt, pc to pixels', default:90.714}) |
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.
if you reorder options you should probably move that before q.
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.
heeh, I missed that. in any case the reordering could be removed of the PR if you want.
bin/carto
Outdated
@@ -76,6 +82,15 @@ if (ext === '.mml') { | |||
console.error("carto: please pass either a .mml file or .mss file"); | |||
} | |||
|
|||
if (options.profile) { | |||
const fs = require('fs'); |
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.
const
is part of ES6, we are still using ES5 so it should be var
.
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.
ack.
"readable-stream": "^2.3.3", | ||
"sax": "~1.2.1", | ||
"util-deprecate": "^1.0.2", | ||
"v8-profiler": "^5.7.0" |
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.
Wouldn't this dependency suffice? Why do we need all the others?
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 had a problem while installing v8-profiler
, it kept complaining about a missing dependency, so I just kept adding things to npm install
until it worked. Also, notice that Travis and AppVeyor complain about v8-profiler
, so probably we could leav it completely out, add a check in the code, and suggest the command to run.
For some reason this breaks; I can't remember how. I will keep working on it later, I hope to add more info tonight.