1f9b13ec98b3b0f2443caf549f69790a52cc0a70,loudml/opentsdb.py,OpenTSDBClient,put,#OpenTSDBClient#Any#,200

Before Change



        // http://opentsdb.net/docs/build/html/api_http/put.html
        // "?sync" query param will force OpenTSDB to write to DB and not cache
        if entry["sync"]:
            url = "{}?sync".format(url)

        del entry["sync"]

After Change


            additional_headers = {}
            additional_headers["Content-Encoding"] = "gzip"
            additional_headers["Content-type"] = "application/json"
            encoded = json.dumps(points).encode("utf-8")
            request_body = gzip.compress(encoded)
            resp = self.session.post(
                url, data=request_body, headers=additional_headers)
        except requests.exceptions.SSLError as exn:
            logging.error("OpenTSDB SSL error", str(exn))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: regel/loudml
Commit Name: 1f9b13ec98b3b0f2443caf549f69790a52cc0a70
Time: 2020-04-13
Author: sebastien.regel@gmail.com
File Name: loudml/opentsdb.py
Class Name: OpenTSDBClient
Method Name: put


Project Name: CyberZHG/keras-bert
Commit Name: 2df9a66ac40d1017792b1c93f34e47e214726d7d
Time: 2019-03-18
Author: CyberZHG@gmail.com
File Name: demo/load_model/load_and_pool.py
Class Name:
Method Name:


Project Name: CyberZHG/keras-bert
Commit Name: 2df9a66ac40d1017792b1c93f34e47e214726d7d
Time: 2019-03-18
Author: CyberZHG@gmail.com
File Name: demo/load_model/load_and_extract.py
Class Name:
Method Name: