135
135
'WorkingSetSize': mem_struct.WorkingSetSize,
136
136
'QuotaPeakPagedPoolUsage': mem_struct.QuotaPeakPagedPoolUsage,
137
137
'QuotaPagedPoolUsage': mem_struct.QuotaPagedPoolUsage,
138
'QuotaPeakNonPagedPoolUsage': mem_struct.QuotaPeakNonPagedPoolUsage,
138
'QuotaPeakNonPagedPoolUsage':
139
mem_struct.QuotaPeakNonPagedPoolUsage,
139
140
'QuotaNonPagedPoolUsage': mem_struct.QuotaNonPagedPoolUsage,
140
141
'PagefileUsage': mem_struct.PagefileUsage,
141
142
'PeakPagefileUsage': mem_struct.PeakPagefileUsage,
152
153
' or win32process')
155
trace.note('WorkingSize %7dKB'
156
'\tPeakWorking %7dKB\t%s',
156
# using base-2 units (see HACKING.txt).
157
trace.note('WorkingSize %7dKiB'
158
'\tPeakWorking %7dKiB\t%s',
157
159
info['WorkingSetSize'] / 1024,
158
160
info['PeakWorkingSetSize'] / 1024,
162
164
trace.note('%s', message)
163
trace.note('WorkingSize %8d KB', info['WorkingSetSize'] / 1024)
164
trace.note('PeakWorking %8d KB', info['PeakWorkingSetSize'] / 1024)
165
trace.note('PagefileUsage %8d KB', info.get('PagefileUsage', 0) / 1024)
166
trace.note('PeakPagefileUsage %8d KB', info.get('PeakPagefileUsage', 0) / 1024)
167
trace.note('PrivateUsage %8d KB', info.get('PrivateUsage', 0) / 1024)
165
trace.note('WorkingSize %8d KiB', info['WorkingSetSize'] / 1024)
166
trace.note('PeakWorking %8d KiB', info['PeakWorkingSetSize'] / 1024)
167
trace.note('PagefileUsage %8d KiB', info.get('PagefileUsage', 0) / 1024)
168
trace.note('PeakPagefileUsage %8d KiB',
169
info.get('PeakPagefileUsage', 0) / 1024)
170
trace.note('PrivateUsage %8d KiB', info.get('PrivateUsage', 0) / 1024)
168
171
trace.note('PageFaultCount %8d', info.get('PageFaultCount', 0))
189
192
(bufx, bufy, curx, cury, wattr,
190
left, top, right, bottom, maxx, maxy) = struct.unpack("hhhhHhhhhhh", csbi.raw)
193
left, top, right, bottom, maxx, maxy) = struct.unpack(
194
"hhhhHhhhhhh", csbi.raw)
191
195
sizex = right - left + 1
192
196
sizey = bottom - top + 1
193
197
return (sizex, sizey)
412
416
def _ensure_with_dir(path):
413
if not os.path.split(path)[0] or path.startswith(u'*') or path.startswith(u'?'):
417
if (not os.path.split(path)[0] or path.startswith(u'*')
418
or path.startswith(u'?')):
414
419
return u'./' + path, True
416
421
return path, False