xcode-build-times-rendering
xcode-build-times-rendering copied to clipboard
Adjust Left Margin and time axis to fit
- The left margin is adjusted using an estimation based on the width of the largest label (target name) – Closes #8
- The time axis now uses the
.timeDomainMode("fit")
(instead of.timeDomainMode("fixed")
with a fixed 10:00 max value) – Closes #9 - Theoretical Minimum is now rounded to two digits (to avoid the
.33333333333
kind of values)
Side note: I'm a bit confused as the .gemspec
in this repo mentions a version 0.1.0
, but on RubyGems the latest published version is 0.1.1
.
Did you forget to commit the version bump from the .gemspec
when you did push the 0.1.1
to rubygems?
In any case, I guess for the next release you'll have to remember to bump the xcode-build-times.gemspec
to 0.1.2
(and not 0.1.1
again) :wink:
Right. The main idea was to be able to compare speed of two different runs. It will be really hard to do with scaled results If we're about to play with scaling, I would rather go with some parameter. If possible.
But that's what this PR does. Specifically, the line .timeDomainMode("fit")
makes it automatically adjust the graph to be full width. I tried it out locally on my generated javascript files and it works great.
My point is that with this size to fit
option, it is hard to visually compare two runs.
So I suggest to have both "fit" and "fixed' width options, and not having simple switch to one of the two options. Both solutions are needed.
- fixed - for comparing different builds (i.e. if you're about to speed up build time)
- fit - to compare different parts of the build
For example. having additional option passed in here https://github.com/PaulTaykalo/xcode-build-times-rendering/blob/master/lib/xcode-build-times.rb#L111
for switching between fixed and fit variants
JFYI: I really grateful for this PR :)