opened
kevinburkeshyp
username_0
Our deploys are currently pretty slow (90 seconds to 3+ minutes) and I was wondering what I could do to speed it up. It would be useful if the buildpack echoed timing information for each step, so that it would be easy to compare across builds (instead of watching the console output and doing rough estimates in your head).
Add timing information
issue
created
hunterloftis
username_1
:+1: I love this idea - it's something we've talked about doing lower in the build system (so all output would be timestamped). Until then, I think it'd be great to do it in the node buildpack.
comment
created
kevinburkeshyp
username_0
sweet. how do you imagine this looking? happy to help out, but if you're
gonna do it go for it.
comment
created
hunterloftis
username_1
Great question... I was thinking probably a function to pipe all output through (kind of like `indent` right now). That way we could change all output lines with minimal code changes, just a new pipe at the end.
comment
created
hunterloftis
username_1
PRs happily accepted ;)
comment
created
kevinburkeshyp
username_0
That would give absolute timestamps, might be nice to have relative timestamps (this is how long this build step took) but that requires storing state. Maybe absolute is a good first pass
comment
created
hunterloftis
username_1
Yeah I think absolute is a good v1, although the function could certainly manage a delta as well if you wanted. (UTC timestamp +5s) or something.
comment
created
anonrig
username_2
+1
comment
created
edmorley
username_3
I have created a buildpack that prefixes each line of the build logs with timestamps, and adds an overall duration to the end of each buildpack's compile step - if it's of any use?
https://github.com/username_3/heroku-buildpack-timestamps

We're been using it in production for 6 months now and it's helped us track down the slow parts of our multi-buildpack builds.
comment