Bug 224433

Summary: `make buildkernel' should display the build time in seconds
Product: Base System Reporter: Wolfram Schneider <wosch>
Component: kernAssignee: Wolfram Schneider <wosch>
Status: Closed FIXED    
Severity: Affects Only Me CC: emaste
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   
URL: https://reviews.freebsd.org/D13910 https://reviews.freebsd.org/D13911
Bug Depends on: 225159    
Bug Blocks:    
Attachments:
Description Flags
makefile patch
none
makefile patch
none
patch for buildworld none

Description Wolfram Schneider freebsd_committer 2017-12-18 19:02:11 UTC
When I run `make buildkernel' the makefile display the start end completed time:

>>> Kernel build for GENERIC started on Sun Dec 17 20:37:08 UTC 2017
[...]
>>> Kernel build for GENERIC completed on Sun Dec 17 20:39:14 UTC 2017

but wouldn't it be great if the makefile display the build time in seconds? 

E.g.:

>>> Kernel build for GENERIC in 125 seconds, ncpu: 32, make -j27
(incl. number of CPUs and the make -j flags)
Comment 1 Wolfram Schneider freebsd_committer 2017-12-18 19:03:15 UTC
Created attachment 188938 [details]
makefile patch
Comment 2 Ed Maste freebsd_committer 2017-12-18 20:29:56 UTC
Comment on attachment 188938 [details]
makefile patch

Shouldn't buildworld get the same treatment?
Comment 3 Wolfram Schneider freebsd_committer 2017-12-19 17:21:26 UTC
Created attachment 188975 [details]
makefile patch

here is a better patch. It will display the correct value if you do not use make -j
Comment 4 Wolfram Schneider freebsd_committer 2017-12-19 17:22:22 UTC
Created attachment 188976 [details]
patch for buildworld
Comment 5 Wolfram Schneider freebsd_committer 2017-12-19 17:25:01 UTC
Note: the build time in seconds does not contain the time spend in `make clean' and `make obj'. There is a chicken-egg problem here, you need the obj tree first before you can write a temp file. The difference is usually small (<2 seconds), not a big issue.
Comment 6 commit-hook freebsd_committer 2019-03-12 07:41:21 UTC
A commit references this bug:

Author: wosch
Date: Tue Mar 12 07:40:39 UTC 2019
New revision: 345054
URL: https://svnweb.freebsd.org/changeset/base/345054

Log:
  `make buildworld' should display the build time in seconds

  PR:		224433
  Reviewed by:	emaste, @bdrewery
  Approved by:	cem
  Differential Revision: https://reviews.freebsd.org/D13911

Changes:
  head/Makefile.inc1
Comment 7 Wolfram Schneider freebsd_committer 2019-03-12 07:46:06 UTC
I was to fast, https://reviews.freebsd.org/D13910 is still open.
Comment 8 commit-hook freebsd_committer 2019-03-16 20:03:53 UTC
A commit references this bug:

Author: wosch
Date: Sat Mar 16 20:02:58 UTC 2019
New revision: 345238
URL: https://svnweb.freebsd.org/changeset/base/345238

Log:
  `make buildkernel' should display the build time in seconds

  PR:		224433
  Approved by:	cem
  Differential Revision:	https://reviews.freebsd.org/D13910

Changes:
  head/Makefile.inc1
Comment 9 commit-hook freebsd_committer 2019-03-19 19:59:44 UTC
A commit references this bug:

Author: wosch
Date: Tue Mar 19 19:58:40 UTC 2019
New revision: 345310
URL: https://svnweb.freebsd.org/changeset/base/345310

Log:
  Improve english grammar for kernel built time

  PR:		224433
  Approved by:	jhb
  Differential Revision:	https://reviews.freebsd.org/D19636

Changes:
  head/Makefile.inc1