Changeset 48004 in webkit


Ignore:
Timestamp:
Sep 2, 2009 7:31:41 PM (15 years ago)
Author:
eric@webkit.org
Message:

2009-09-02 Laurent Cerveau <lcerveau@me.com>

Reviewed by David Kilzer.

<http://webkit.org/b/25517> build-webkit script should print build time at end

  • Scripts/build-webkit: Added startTime and endTime variable so that the build time is computed and printed as part of the build message; display formatting has been separated in a dedicated subroutine.
Location:
trunk/WebKitTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r48003 r48004  
     12009-09-02  Laurent Cerveau  <lcerveau@me.com>
     2
     3        Reviewed by David Kilzer.
     4
     5        <http://webkit.org/b/25517> build-webkit script should print build time at end
     6
     7        * Scripts/build-webkit:
     8        Added startTime and endTime variable so that the build time is computed and printed as
     9        part of the build message; display formatting has been separated in a dedicated subroutine.
     10
    1112009-09-02  David Kilzer  <ddkilzer@apple.com>
    212
  • trunk/WebKitTools/Scripts/build-webkit

    r47972 r48004  
    3838use POSIX;
    3939
     40sub formatBuildTime($);
     41
    4042my $originalWorkingDirectory = getcwd();
    4143chdirWebKit();
     
    4547my $minimal = 0;
    4648my $makeArgs;
     49my $startTime = time();
    4750
    4851my ($threeDCanvasSupport, $threeDRenderingSupport, $channelMessagingSupport, $databaseSupport, $datagridSupport, $domStorageSupport,
     
    363366my $launcherPath = launcherPath();
    364367my $launcherName = launcherName();
     368my $endTime = time();
     369my $buildTime = formatBuildTime($endTime - $startTime);
    365370
    366371print "\n";
    367372print "===========================================================\n";
    368 print " WebKit is now built. To run $launcherName with this newly-built\n";
    369 print " code, use the \"$launcherPath\" script.\n";
     373print " WebKit is now built ($buildTime). \n";
     374print " To run $launcherName with this newly-built code, use the\n";
     375print " \"$launcherPath\" script.\n";
    370376print "===========================================================\n";
    371377
    372378exit 0;
     379
     380sub formatBuildTime($)
     381{
     382    my ($buildTime) = @_;
     383
     384    my $buildHours = int($buildTime / 3600);
     385    my $buildMins = int(($buildTime - $buildHours * 3600) / 60);
     386    my $buildSecs = $buildTime - $buildHours * 3600 - $buildMins * 60;
     387
     388    if ($buildHours) {
     389        return sprintf("%dh:%02dm:%02ds", $buildHours, $buildMins, $buildSecs);
     390    }
     391    return sprintf("%02dm:%02ds", $buildMins, $buildSecs);
     392}
Note: See TracChangeset for help on using the changeset viewer.