Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

WIP: -p/--profile option starts v8/chromium/chrome compatible profiling. #485

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

StyXman
Copy link

@StyXman StyXman commented Jul 28, 2017

For some reason this breaks; I can't remember how. I will keep working on it later, I hope to add more info tonight.

@StyXman
Copy link
Author

StyXman commented Jul 28, 2017

This should help fixing things like #483.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 89.448% when pulling 8e2b0f2 on StyXman:profiling into 93a5568 on mapbox:master.

Copy link
Collaborator

@nebulon42 nebulon42 left a 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})
Copy link
Collaborator

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.

Copy link
Author

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');
Copy link
Collaborator

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.

Copy link
Author

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"
Copy link
Collaborator

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?

Copy link
Author

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.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 89.448% when pulling b077c38 on StyXman:profiling into 93a5568 on mapbox:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 89.448% when pulling 1f3ca6a on StyXman:profiling into 93a5568 on mapbox:master.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants