f4202ba48d22942c67312bac8a7924573a9d9956,poseidon/helpers/prometheus.py,Prometheus,prom_query,#Prometheus#Any#Any#Any#Any#,274

Before Change


        payload = {"query": var, "start": start_time_str, "end": end_time_str, "step": step}
        try:
            response = requests.get("http://%s/api/v1/query_range" % self.prometheus_addr, params=payload)
            return response.json()["data"]["result"]
        except Exception:
            return None

    @staticmethod

After Change


        try:
            response = requests.get("http://%s/api/v1/query_range" % self.prometheus_addr, params=payload)
        except Exception:
            return []
        return self.sorted_metrics(response)

    def consolidate_prom(self, mr, r1, r2, r3):
        hashes = {}
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: CyberReboot/poseidon
Commit Name: f4202ba48d22942c67312bac8a7924573a9d9956
Time: 2020-12-16
Author: josh@vandervecken.com
File Name: poseidon/helpers/prometheus.py
Class Name: Prometheus
Method Name: prom_query


Project Name: home-assistant/home-assistant
Commit Name: 512c4629b66dc3931c3ba36979f6ca6d08885bfe
Time: 2015-06-02
Author: fabian@affolter-engineering.ch
File Name: homeassistant/components/sensor/swiss_public_transport.py
Class Name: PublicTransportData
Method Name: update


Project Name: home-assistant/home-assistant
Commit Name: 458838e9c63688637bb765ce7d18142affb12148
Time: 2015-06-02
Author: fabian@affolter-engineering.ch
File Name: homeassistant/components/sensor/swiss_public_transport.py
Class Name: PublicTransportData
Method Name: update