File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 10
10
11
11
import argparse
12
12
import contextlib
13
+ import datetime
13
14
import hashlib
14
15
import os
15
16
import shutil
18
19
import tarfile
19
20
import tempfile
20
21
22
+ from time import time
23
+
21
24
22
25
def get (url , path , verbose = False ):
23
26
sha_url = url + ".sha256"
@@ -118,6 +121,9 @@ def stage0_data(rust_root):
118
121
data [a ] = b
119
122
return data
120
123
124
+ def format_build_time (duration ):
125
+ return str (datetime .timedelta (seconds = int (duration )))
126
+
121
127
class RustBuild :
122
128
def download_stage0 (self ):
123
129
cache_dst = os .path .join (self .build_dir , "cache" )
@@ -372,6 +378,8 @@ def main():
372
378
rb ._rustc_channel , rb ._rustc_date = data ['rustc' ].split ('-' , 1 )
373
379
rb ._cargo_channel , rb ._cargo_date = data ['cargo' ].split ('-' , 1 )
374
380
381
+ start_time = time ()
382
+
375
383
# Fetch/build the bootstrap
376
384
rb .build = rb .build_triple ()
377
385
rb .download_stage0 ()
@@ -390,5 +398,9 @@ def main():
390
398
env ["BOOTSTRAP_PARENT_ID" ] = str (os .getpid ())
391
399
rb .run (args , env )
392
400
401
+ end_time = time ()
402
+
403
+ print ("Build completed in %s" % format_build_time (end_time - start_time ))
404
+
393
405
if __name__ == '__main__' :
394
406
main ()
You can’t perform that action at this time.
0 commit comments