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