Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add debug cmd switch #43

Closed
XhmikosR opened this issue Dec 22, 2012 · 11 comments
Closed

Add debug cmd switch #43

XhmikosR opened this issue Dec 22, 2012 · 11 comments
Assignees
Milestone

Comments

@XhmikosR
Copy link
Contributor

..which would show the time spent and the compression ratio for the task.

@GoalSmashers
Copy link
Contributor

@XhmikosR quick question - would you like to see the same output as in npm run bench or rather than that something simple like:

Minification time: 93ms
Compression ratio: 19%

I'd go for the latter one.

@XhmikosR
Copy link
Contributor Author

XhmikosR commented Sep 5, 2013

Yeah, I agree with the later one too. I don't think there is a gain by showing the time for each time of transformation.

GoalSmashers pushed a commit that referenced this issue Sep 5, 2013
@GoalSmashers
Copy link
Contributor

@XhmikosR See d198bd2 - that should be it!

@XhmikosR
Copy link
Contributor Author

XhmikosR commented Sep 5, 2013

1st thought, is maybe mention the switch change in History.md.

Secondly, I'm wondering, is "compression ratio" the right thing to show? How about showing the percentage of the original file the compressed file is?

@GoalSmashers
Copy link
Contributor

Good point with History.md.

Maybe it shouldn't be called "ratio" but instead something like "compression efficiency" as it is calculated as:

  • input data - 200 bytes
  • minified data - 160 bytes
  • compression ratio - (1 - 160 / 200) * 100 = 20%

@XhmikosR
Copy link
Contributor Author

XhmikosR commented Sep 5, 2013

I think that's the difference then.

@GoalSmashers
Copy link
Contributor

👍

@XhmikosR
Copy link
Contributor Author

XhmikosR commented Sep 5, 2013

GoalSmashers pushed a commit that referenced this issue Sep 5, 2013
@GoalSmashers
Copy link
Contributor

Ok, that's it. Merging to master...

@XhmikosR
Copy link
Contributor Author

XhmikosR commented Sep 7, 2013

@GoalSmashers: Do you think you could expose debug in JS too?

Example:

var packCss = cleanCSS.process(inCss2, {
    removeEmpty: true,
    keepSpecialComments: 0,
    debug: true
});

@GoalSmashers
Copy link
Contributor

We will do once #138 is done. Current stateless design is pretty messed up.

Please open a separate ticket for it.

On 7 Sep 2013, at 11:42, XhmikosR notifications@github.com wrote:

@GoalSmashers: Do you think you could expose debug in JS too?

Example:

var packCss = cleanCSS.process(inCss2, {
removeEmpty: true,
keepSpecialComments: 0,
debug: true
});

Reply to this email directly or view it on GitHub.

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

No branches or pull requests

2 participants