bd3a1021d7d990d5d4a8a71cc0621485af2d09e4,perfkitbenchmarker/linux_virtual_machine.py,LsCpuResults,__init__,#LsCpuResults#Any#,1631

Before Change


    NUMA node0 CPU(s):     0-11
    
    match = re.search(r"NUMA\ node\(s\):\s*(\d+)$", lscpu, re.MULTILINE)
    if match:
      self.numa_node_count = int(match.group(1))
    else:
      raise ValueError("NUMA Node(s) could not be found in lscpu value:\n%s" %
                       lscpu)

    match = re.search(r"Core\(s\)\ per\ socket:\s*(\d+)$", lscpu, re.MULTILINE)
    if match:
      self.cores_per_socket = int(match.group(1))
    else:

After Change


    self.data = {}
    for line in lscpu.splitlines():
      m = self._KEY_VALUE_RE.match(line)
      if m:
        self.data[m.group("key")] = m.group("value")
      else:
        logging.debug("Ignoring bad lscpu line "%s"", line)

    def GetInt(key):
      if key in self.data and self.data[key].isdigit():
        return int(self.data[key])
      raise ValueError("Could not find integer "{}" in {}".format(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: bd3a1021d7d990d5d4a8a71cc0621485af2d09e4
Time: 2019-09-03
Author: chriswilkes@google.com
File Name: perfkitbenchmarker/linux_virtual_machine.py
Class Name: LsCpuResults
Method Name: __init__


Project Name: PyMVPA/PyMVPA
Commit Name: 8537f41308b59c274d07a51878df8279de41b1c0
Time: 2012-03-02
Author: debian@onerussian.com
File Name: mvpa2/__init__.py
Class Name:
Method Name:


Project Name: home-assistant/home-assistant
Commit Name: 0feb1c3e287383ac48fd0b6e0aa7369fcac5f9f7
Time: 2017-02-13
Author: andrey-git@users.noreply.github.com
File Name: homeassistant/components/cover/zwave.py
Class Name: ZwaveRollershutter
Method Name: __init__