Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Side by Side Diff: gclient_utils.py

Issue 250803012: Add more flushes to gclient_utils (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Generic utils.""" 5 """Generic utils."""
6 6
7 import codecs 7 import codecs
8 import cStringIO 8 import cStringIO
9 import datetime 9 import datetime
10 import logging 10 import logging
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 # We need to poll here otherwise Ctrl-C isn't processed. 817 # We need to poll here otherwise Ctrl-C isn't processed.
818 try: 818 try:
819 self.ready_cond.wait(10) 819 self.ready_cond.wait(10)
820 # If we haven't printed to terminal for a while, but we have received 820 # If we haven't printed to terminal for a while, but we have received
821 # spew from a suprocess, let the user know we're still progressing. 821 # spew from a suprocess, let the user know we're still progressing.
822 now = datetime.datetime.now() 822 now = datetime.datetime.now()
823 if (now - self.last_join > datetime.timedelta(seconds=60) and 823 if (now - self.last_join > datetime.timedelta(seconds=60) and
824 self.last_subproc_output > self.last_join): 824 self.last_subproc_output > self.last_join):
825 if self.progress: 825 if self.progress:
826 print >> sys.stdout, '' 826 print >> sys.stdout, ''
827 sys.stdout.flush()
827 elapsed = Elapsed() 828 elapsed = Elapsed()
828 print >> sys.stdout, '[%s] Still working on:' % elapsed 829 print >> sys.stdout, '[%s] Still working on:' % elapsed
830 sys.stdout.flush()
829 for task in self.running: 831 for task in self.running:
830 print >> sys.stdout, '[%s] %s' % (elapsed, task.item.name) 832 print >> sys.stdout, '[%s] %s' % (elapsed, task.item.name)
833 sys.stdout.flush()
831 except KeyboardInterrupt: 834 except KeyboardInterrupt:
832 # Help debugging by printing some information: 835 # Help debugging by printing some information:
833 print >> sys.stderr, ( 836 print >> sys.stderr, (
834 ('\nAllowed parallel jobs: %d\n# queued: %d\nRan: %s\n' 837 ('\nAllowed parallel jobs: %d\n# queued: %d\nRan: %s\n'
835 'Running: %d') % ( 838 'Running: %d') % (
836 self.jobs, 839 self.jobs,
837 len(self.queued), 840 len(self.queued),
838 ', '.join(self.ran), 841 ', '.join(self.ran),
839 len(self.running))) 842 len(self.running)))
840 for i in self.queued: 843 for i in self.queued:
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 def DefaultIndexPackConfig(url=''): 1083 def DefaultIndexPackConfig(url=''):
1081 """Return reasonable default values for configuring git-index-pack. 1084 """Return reasonable default values for configuring git-index-pack.
1082 1085
1083 Experiments suggest that higher values for pack.threads don't improve 1086 Experiments suggest that higher values for pack.threads don't improve
1084 performance.""" 1087 performance."""
1085 cache_limit = DefaultDeltaBaseCacheLimit() 1088 cache_limit = DefaultDeltaBaseCacheLimit()
1086 result = ['-c', 'core.deltaBaseCacheLimit=%s' % cache_limit] 1089 result = ['-c', 'core.deltaBaseCacheLimit=%s' % cache_limit]
1087 if url in THREADED_INDEX_PACK_BLACKLIST: 1090 if url in THREADED_INDEX_PACK_BLACKLIST:
1088 result.extend(['-c', 'pack.threads=1']) 1091 result.extend(['-c', 'pack.threads=1'])
1089 return result 1092 return result
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698