Bug 1261873 - windows 7 cpu/mem counters are showing up as values of 0 after changing the process names. r?wlach draft
authorJoel Maher <jmaher@mozilla.com>
Mon, 04 Apr 2016 12:53:42 -0400
changeset 348010 331ed8ed57e3a5f787b1c56d0ba2164de5d0353d
parent 347868 2c8c35258999b32422bea205da5c5cecee7961a6
child 517763 1cf1cc7c4a70ee24f278287e0237c1e101b27ed8
push id14728
push userjmaher@mozilla.com
push dateWed, 06 Apr 2016 10:10:59 +0000
reviewerswlach
bugs1261873
milestone48.0a1
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]