xcode-build-times-rendering icon indicating copy to clipboard operation
xcode-build-times-rendering copied to clipboard

Adjust Left Margin and time axis to fit

Open AliSoftware opened this issue 5 years ago • 6 comments

  • 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)

AliSoftware avatar Mar 27 '19 19:03 AliSoftware

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:

AliSoftware avatar Mar 27 '19 19:03 AliSoftware

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.

PaulTaykalo avatar Apr 19 '19 13:04 PaulTaykalo

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.

khanlou avatar Apr 19 '19 17:04 khanlou

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

PaulTaykalo avatar Apr 19 '19 18:04 PaulTaykalo

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

PaulTaykalo avatar Apr 19 '19 18:04 PaulTaykalo

JFYI: I really grateful for this PR :)

PaulTaykalo avatar Apr 19 '19 18:04 PaulTaykalo