Bug 1261873 - windows 7 cpu/mem counters are showing up as values of 0 after changing the process names. r=wlach
authorJoel Maher <jmaher@mozilla.com>
Mon, 04 Apr 2016 12:53:42 -0400
changeset 291891 70e457189e30e11a8d059a27fbb0a442554a93aa
parent 291890 aa65acd9650aa99e5452dd7344ff06d387c6e3f9
child 291892 21b79c0204a8c90cffc082cd6cdb09363051245c
push id74716
push userjmaher@mozilla.com
push dateWed, 06 Apr 2016 15:27:10 +0000
treeherdermozilla-inbound@70e457189e30 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswlach
bugs1261873
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1261873 - windows 7 cpu/mem counters are showing up as values of 0 after changing the process names. r=wlach MozReview-Commit-ID: Dq656v5Zjks
testing/talos/talos/cmanager_win32.py
--- a/testing/talos/talos/cmanager_win32.py
+++ b/testing/talos/talos/cmanager_win32.py
@@ -33,23 +33,23 @@ def _getExpandedCounterPaths(processName
     '''
     pcchPathListLength = DWORD(0)
     szWildCardPath = LPSTR('\\process(%s)\\%s' % (processName, counterName))
     if pdh.PdhExpandCounterPathA(
         szWildCardPath,
         LPSTR(None),
         pointer(pcchPathListLength)
     ) != _PDH_MORE_DATA:
-        return None
+        return []
 
     pathListLength = pcchPathListLength.value
     szExpandedPathList = LPCSTR('\0' * pathListLength)
     if pdh.PdhExpandCounterPathA(szWildCardPath, szExpandedPathList,
                                  pointer(pcchPathListLength)) != 0:
-        return None
+        return []
     buffer = create_string_buffer(pcchPathListLength.value)
     memmove(buffer, szExpandedPathList, pcchPathListLength.value)
 
     paths = []
     i = 0
     path = ''
     for j in range(0, pcchPathListLength.value):
         c = struct.unpack_from('c', buffer, offset=j)[0]