diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-07-05 23:23:49 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2018-07-06 06:25:12 +0000 |
commit | e4417eb301bab96c343c5b95f074d1900706b667 (patch) | |
tree | cde1f15ba6c58deacaf39f5e7d66476a1d14286a /mesonbuild/mesonmain.py | |
parent | 1415cd2d07477158bcc03a333a78522a3c972938 (diff) | |
download | meson-e4417eb301bab96c343c5b95f074d1900706b667.zip meson-e4417eb301bab96c343c5b95f074d1900706b667.tar.gz meson-e4417eb301bab96c343c5b95f074d1900706b667.tar.bz2 |
mlog: Log timestamps in profile-self mode
This makes it much clearer which statements are taking a long time,
and helps in interpreting the outputted profile itself.
Diffstat (limited to 'mesonbuild/mesonmain.py')
-rw-r--r-- | mesonbuild/mesonmain.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py index 8a19631..1aca9c6 100644 --- a/mesonbuild/mesonmain.py +++ b/mesonbuild/mesonmain.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import time import sys, stat, traceback, argparse import datetime import os.path @@ -110,6 +111,8 @@ class MesonApp: def generate(self): env = environment.Environment(self.source_dir, self.build_dir, self.options) mlog.initialize(env.get_log_dir()) + if self.options.profile: + mlog.set_timestamp_start(time.monotonic()) with mesonlib.BuildDirLock(self.build_dir): self._generate(env) |