[users at bb.net] Timestamp on stdio logs?

Vasily just.one.man at yandex.ru
Thu Sep 15 06:14:47 UTC 2016


Sconsparts is an extension for SCons which has a lot of nice features
including improved logging. Though typically it's viewed as kind of
"enterprise" extention, that is, targeted for huge projects.

Thanks,
Vasily
13 сент. 2016 г. 21:32 пользователь "Long Vu" <long.vu at intelerad.com>
написал:

> Thanks Vasily for sconsparts.  I quickly browse the repo and I am not
> sure I understand what is is for.
>
> Are these sample codes?  Or Scons extensions?
>
> As for what I thought was a buffering issue, it is in fact intermediate
> targets.
>
> It was this issue "Add target name to --debug=time timing output"
> http://scons.tigris.org/issues/show_bug.cgi?id=2873
>
> I tried a more recent version of scons (2.3.0, I had 2.2.0) and now I
> see the target names:
>
> Command execution time:
> Web/UserAuthentication/servlet/build/UserAuthentication.jar: 0.214237
> seconds
> Command execution time: Web/UserAuthentication/servlet/build: 0.000008
> seconds
> Command execution time: Web/UserAuthentication/servlet: 0.000003 seconds
> Command execution time: Web/UserAuthentication: 0.000003 seconds
>
> So the stacking of multiple "Command execution time" with very short
> duration was in fact all the intermediate targets.  I am not using
> parallel builds.
>
>
> On Tue, Sep 13, 2016 at 1:48 PM, Vasily <just.one.man at yandex.ru> wrote:
> > If I remember correctly, this debug info goes to stderr while "normal"
> > output goes to stdout, so a possible workaround would be to redirect
> stderr
> > to stdout, e.g. by adding "2>&1" to the end of command line.
> > Also note that this debug option won't work too well for parallel builds.
> >
> > P.S. Give a look at Parts extension for SCons, their logger might do
> exactly
> > what you need. Should be hosted at bitbucket.org/sconsparts or something
> > similar.
> >
> > Thanks,
> > Vasily
> >
> > 13 сент. 2016 г. 18:45 пользователь "Long Vu" <long.vu at intelerad.com>
> > написал:
> >
> >> Thanks Pierre !  This ts utility looks like what I need.
> >>
> >> I also gave the --debug=time a try, it is by far the easiest to
> >> implement.  So far it works great too but with possibly some weird
> >> buffering behavior.
> >>
> >> It seems that for built-in scons actions (ex: Delete, Mkdir) or
> >> commands that produce no stdout/stderr and is very fast (ex: ln,
> >> touch) , the "Command execution time" message seems to be buffered and
> >> I have a bunch of them stacked together so it is not exactly clear
> >> which "execution time" is for which command.
> >>
> >> However for slow commands (ex: the actually compilation) that produce
> >> output, then the immediately following "Command execution time" seems
> >> to be the matching one.  Although it can also be followed by a stack
> >> of other very short "Command execution time" from preceding quick
> >> actions.
> >>
> >> I think this could be a buffering problem.  Is there a way to turn off
> >> buffering?
> >>
> >>
> >>
> >> On Mon, Sep 12, 2016 at 3:44 PM, Pierre Tardy <tardyp at gmail.com> wrote:
> >> > Hello,
> >> > as per
> >> >
> >> > http://unix.stackexchange.com/questions/26728/prepending-a-
> timestamp-to-each-line-of-output-from-a-command
> >> > you can use moreutils's ts to prepend timestamp to your commands:
> >> >
> >> >   scons <whatever>| ts '[%Y-%m-%d %H:%M:%S]'
> >> >
> >> > Le lun. 12 sept. 2016 à 21:36, Long Vu <long.vu at intelerad.com> a
> écrit :
> >> >>
> >> >> Thanks Vasily !  Not what we were looking for but could fill our
> needs.
> >> >>
> >> >> I am still hoping someone could propose an option (ex: in
> >> >> BuildmasterConfig) that we could turn on for all builders so we can
> >> >> have timestamps for anything, not just scons build step.
> >> >>
> >> >>
> >> >> On Mon, Sep 12, 2016 at 2:06 PM, Vasily <just.one.man at yandex.ru>
> wrote:
> >> >> > Hi,
> >> >> >
> >> >> > Just try --debug=time SCons option ;-)
> >> >> >
> >> >> > Thanks,
> >> >> > Vasily
> >> >> >
> >> >> > 12 сент. 2016 г. 20:01 пользователь "Long Vu" <
> long.vu at intelerad.com>
> >> >> > написал:
> >> >> >>
> >> >> >> Hi,
> >> >> >>
> >> >> >> Our buildbot calls scons which then calls the various commands
> that
> >> >> >> made up the build.
> >> >> >>
> >> >> >> We want to diagnose slow builds, specifically which of the
> commands
> >> >> >> is
> >> >> >> hogging build time.
> >> >> >>
> >> >> >> So is there a quick way to prefix timestamp on each log line
> >> >> >> collected
> >> >> >> by buildbot?
> >> >> >>
> >> >> >> The alternative would be to modify all the scons build file in all
> >> >> >> the
> >> >> >> source repository to prefix the timestamp, but that would means a
> >> >> >> lot
> >> >> >> of commits.
> >> >> >>
> >> >> >> We would prefer a centralized solution in buildbot that will also
> >> >> >> future proof all the new source repositories that we will add
> later.
> >> >> >>
> >> >> >> Thanks,
> >> >> >>
> >> >> >>
> >> >> >> --
> >> >> >> Long Vu | Build Controller | Intelerad | +1-514-931-6222 ext. 7743
> >> >> >>
> >> >> >> --
> >> >> >>
> >> >> >> This email or any attachments may contain confidential or legally
> >> >> >> privileged information intended for the sole use of the
> addressees.
> >> >> >> Any
> >> >> >> use, redistribution, disclosure, or reproduction of this
> >> >> >> information,
> >> >> >> except as intended, is prohibited. If you received this email in
> >> >> >> error,
> >> >> >> please notify the sender and remove all copies of the message,
> >> >> >> including
> >> >> >> any attachments.
> >> >> >>
> >> >> >> _______________________________________________
> >> >> >> users mailing list
> >> >> >> users at buildbot.net
> >> >> >> https://lists.buildbot.net/mailman/listinfo/users
> >> >> >>
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Long Vu | Build Controller | Intelerad | +1-514-931-6222 ext. 7743
> >> >>
> >> >> --
> >> >>
> >> >> This email or any attachments may contain confidential or legally
> >> >> privileged information intended for the sole use of the addressees.
> Any
> >> >> use, redistribution, disclosure, or reproduction of this information,
> >> >> except as intended, is prohibited. If you received this email in
> error,
> >> >> please notify the sender and remove all copies of the message,
> >> >> including
> >> >> any attachments.
> >> >>
> >> >> _______________________________________________
> >> >> users mailing list
> >> >> users at buildbot.net
> >> >> https://lists.buildbot.net/mailman/listinfo/users
> >>
> >>
> >>
> >> --
> >> Long Vu | Build Controller | Intelerad | +1-514-931-6222 ext. 7743
> >>
> >> --
> >>
> >> This email or any attachments may contain confidential or legally
> >> privileged information intended for the sole use of the addressees. Any
> >> use, redistribution, disclosure, or reproduction of this information,
> >> except as intended, is prohibited. If you received this email in error,
> >> please notify the sender and remove all copies of the message, including
> >> any attachments.
> >>
> >>
> >
>
>
>
> --
> Long Vu | Build Controller | Intelerad | +1-514-931-6222 ext. 7743
>
> --
>
> This email or any attachments may contain confidential or legally
> privileged information intended for the sole use of the addressees. Any
> use, redistribution, disclosure, or reproduction of this information,
> except as intended, is prohibited. If you received this email in error,
> please notify the sender and remove all copies of the message, including
> any attachments.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20160915/b0bb4cea/attachment.html>


More information about the users mailing list