From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp52.i.mail.ru (smtp52.i.mail.ru [94.100.177.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 9191045C305 for ; Tue, 8 Dec 2020 14:37:22 +0300 (MSK) From: Oleg Koshovetc References: <984618ac-e7ee-c7db-4c0d-f71fbba59210@tarantool.org> Message-ID: Date: Tue, 8 Dec 2020 14:36:38 +0300 MIME-Version: 1.0 In-Reply-To: <984618ac-e7ee-c7db-4c0d-f71fbba59210@tarantool.org> Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: 8bit Content-Language: en-US Subject: [Tarantool-patches] [PATCH 1/2] fix: remove unnecessary publication scripts List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Turenko , Alexander Tikhonov Cc: tarantool-patches@dev.tarantool.org ---  benches/publication/publish.py | 64 ------------------------------------------  1 file changed, 64 deletions(-)  delete mode 100755 benches/publication/publish.py diff --git a/benches/publication/publish.py b/benches/publication/publish.py deleted file mode 100755 index 42bc53a..0000000 --- a/benches/publication/publish.py +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env python -import fnmatch -import os -from urllib import urlencode -import requests - - -def parse_bench(filename): -    with open(filename) as raw_data: -        return raw_data.readlines() - - -def get_version(filename): -    with open(filename) as raw_data: -        version = raw_data.readlines()[-1] -        return version.split()[0] - - -def push_to_microb(server, token, name, value, version, tab): -    uri = 'http://%s/push?%s' % (server, urlencode(dict( -        key=token, name=name, param=value, -        v=version, unit='trps', tab=tab -    ))) - -    r = requests.get(uri) -    if r.status_code == 200: -        print('Export complete') -    else: -        print('Export error http: %d' % r.status_code) -        print('Export error text: %d' % r.text) - - -def main(): -    if "MICROB_WEB_TOKEN" in os.environ and "MICROB_WEB_HOST" in os.environ: -        bench = {} -        res = [] -        current_data = {} -        version = '' -        for file in os.listdir('.'): -            if fnmatch.fnmatch(file, '*_result.txt'): -                values = parse_bench(file) -                benchmark = file.split('_')[0] -                version = get_version('{}_t_version.txt'.format(benchmark)) -                for value in values: -                    test_name = value.split(':')[0] -                    test_res = float(value.split(':')[1]) -                    res.append(test_res) -                    push_to_microb( -                        os.environ['MICROB_WEB_HOST'], -                        os.environ['MICROB_WEB_TOKEN'], -                        test_name, -                        test_res, -                        version, -                        benchmark, -                    ) -        print ("VERSION - ", version) -    else: -        print("MICROB params not specified") - -    return 0 - - -if __name__ == '__main__': -    main() -- 2.7.4