[Nix-dev] Re: [Nix-commits] SVN commit: nix - r26115 - nixpkgs/branches/stdenv-updates/pkgs/stdenv/generic
Ludovic Courtès
ludo at gnu.org
Fri Feb 25 18:29:46 CET 2011
Hi Eelco,
Eelco Dolstra <e.dolstra at tudelft.nl> writes:
> On 02/25/2011 04:28 PM, Ludovic Courtès wrote:
>
>> stdenv: Emit `phase-started' and `phase-succeeded' events.
>>
>> These markers follow the format of those of `nix-store --print-build-trace',
>> which allows extraction of, say, phase durations in a similar way.
>
> But contrary to the markers printed by `nix-store --print-build-trace', these
> show up during normal use (so it's kind of ugly).
I tend to agree. However, there’s no way to know whether
--print-build-trace was passed. How could we make it optional without
adding a new build input to stdenv?
> It's worth noting that the escape sequences printed by
> startNest/stopNest allows phase start/end to be extracted.
I don’t think it would work for my purposes (measuring the duration of
each phase), because (1) ‘showPhaseHeader’ uses strings for human
consumption, and (2) it doesn’t show the value of $out, and (3)
‘stopNest’ doesn’t show $curPhase and $out.
(1) is mostly cosmetic, but (2) and (3) make it unusable when
build-max-jobs > 1 because of the interleaved output.
Does that make sense?
Thanks,
Ludo’.
More information about the nix-dev
mailing list