yandextank/plugins/JMeter/plugin.py
def __discover_jmeter_udp_port(self):
        """Searching for line in jmeter.log such as
        Waiting for possible shutdown message on port 4445
        """
        r = re.compile(self.DISCOVER_PORT_PATTERN)
        with open(self.process_stderr.name, 'r') as f:
            cnt = 0
            while self.process.pid and cnt < 10:
                line = f.readline()
                m = r.match(line)
                if m is None:
                    cnt += 1
                    time.sleep(1)
                else:
                    port = int(m.group('port'))
                    return port
            else:
                logger.warning('JMeter UDP port wasn\'t discovered')
                return None
def __discover_jmeter_udp_port(self):
        r = re.compile(self.DISCOVER_PORT_PATTERN)
        with open(self.process_stderr.name, 'r') as f:
            cnt = 0
            while self.process.pid and cnt < 10:
                line = f.readline()
                m = r.match(line)
                if m is None:
                    cnt += 1
                    time.sleep(1)
                else:
                    port = int(m.group('port'))
                    return port
            else:
                logger.warning('JMeter UDP port wasn\'t discovered')
                return None
def __discover_jmeter_udp_port ( self ) : r = re . compile ( self . DISCOVER_PORT_PATTERN ) with open ( self . process_stderr . name , 'r' ) as f : cnt = 0 while self . process . pid and cnt < 10 : line = f . readline ( ) m = r . match ( line ) if m is None : cnt += 1 time . sleep ( 1 ) else : port = int ( m . group ( 'port' ) ) return port else : logger . warning ( 'JMeter UDP port wasn\'t discovered' ) return None
Searching for line in jmeter.log such as
        Waiting for possible shutdown message on port 4445
Searching for line in jmeter . log such as Waiting for possible shutdown message on port 4445