Mercurial > hg
changeset 30981:a0c4e57074fe
crecord: log blocked time waiting for curses input
We want to know when we're blocked waiting for the user - log the time spent
waiting in the curses keyboard handlers
author | Simon Farnsworth <simonfar@fb.com> |
---|---|
date | Wed, 15 Feb 2017 13:34:06 -0800 |
parents | 60b5db2ab586 |
children | 08e6f4dac2ca |
files | mercurial/crecord.py |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/crecord.py Wed Feb 15 13:38:00 2017 -0800 +++ b/mercurial/crecord.py Wed Feb 15 13:34:06 2017 -0800 @@ -1375,7 +1375,8 @@ pass helpwin.refresh() try: - helpwin.getkey() + with self.ui.timeblockedsection('crecord'): + helpwin.getkey() except curses.error: pass @@ -1392,7 +1393,8 @@ self.stdscr.refresh() confirmwin.refresh() try: - response = chr(self.stdscr.getch()) + with self.ui.timeblockedsection('crecord'): + response = chr(self.stdscr.getch()) except ValueError: response = None @@ -1412,7 +1414,8 @@ are you sure you want to review/edit and confirm the selected changes [yn]? """) - response = self.confirmationwindow(confirmtext) + with self.ui.timeblockedsection('crecord'): + response = self.confirmationwindow(confirmtext) if response is None: response = "n" if response.lower().startswith("y"): @@ -1655,7 +1658,8 @@ while True: self.updatescreen() try: - keypressed = self.statuswin.getkey() + with self.ui.timeblockedsection('crecord'): + keypressed = self.statuswin.getkey() if self.errorstr is not None: self.errorstr = None continue