From 8dc5d7b4ec39f5a0a4c9e87f86e7dfe2a6e82311 Mon Sep 17 00:00:00 2001 From: filipecosta90 Date: Mon, 16 May 2022 13:03:34 +0100 Subject: [PATCH 1/4] Enabled to specify redis_proc_start_port on self contained coordinator --- redis_benchmarks_specification/__api__/app.py | 11 ++++++++++- .../__self_contained_coordinator__/args.py | 1 + .../self_contained_coordinator.py | 12 +++++++----- utils/tests/test_app.py | 15 ++++++++++++++- utils/tests/test_data/dump.rdb | Bin 9073541 -> 9073539 bytes 5 files changed, 32 insertions(+), 7 deletions(-) diff --git a/redis_benchmarks_specification/__api__/app.py b/redis_benchmarks_specification/__api__/app.py index 903ae59..f0a164a 100644 --- a/redis_benchmarks_specification/__api__/app.py +++ b/redis_benchmarks_specification/__api__/app.py @@ -14,6 +14,15 @@ SIG_HEADER = "X-Hub-Signature" +def should_action(action): + res = False + types = ["synchronize", "opened", "reopened", "labeled"] + for tt in types: + if action in tt: + res = True + return res + + def create_app(conn, user, test_config=None): app = Flask(__name__) @@ -63,7 +72,7 @@ def base(): trigger_label = PULL_REQUEST_TRIGGER_LABEL if "pull_request" in request_data: action = request_data["action"] - if "labeled" == action: + if should_action(action): pull_request_dict = request_data["pull_request"] head_dict = pull_request_dict["head"] repo_dict = head_dict["repo"] diff --git a/redis_benchmarks_specification/__self_contained_coordinator__/args.py b/redis_benchmarks_specification/__self_contained_coordinator__/args.py index ecd7bbb..08080f4 100644 --- a/redis_benchmarks_specification/__self_contained_coordinator__/args.py +++ b/redis_benchmarks_specification/__self_contained_coordinator__/args.py @@ -36,6 +36,7 @@ def create_self_contained_coordinator_args(project_name): default=MACHINE_CPU_COUNT, help="Specify how much of the available CPU resources the coordinator can use.", ) + parser.add_argument("--redis_proc_start_port", type=int, default=6379) parser.add_argument("--cpuset_start_pos", type=int, default=0) parser.add_argument( "--platform-name", diff --git a/redis_benchmarks_specification/__self_contained_coordinator__/self_contained_coordinator.py b/redis_benchmarks_specification/__self_contained_coordinator__/self_contained_coordinator.py index bd96389..6b03cf9 100644 --- a/redis_benchmarks_specification/__self_contained_coordinator__/self_contained_coordinator.py +++ b/redis_benchmarks_specification/__self_contained_coordinator__/self_contained_coordinator.py @@ -174,6 +174,8 @@ def main(): home = str(Path.home()) cpuset_start_pos = args.cpuset_start_pos logging.info("Start CPU pinning at position {}".format(cpuset_start_pos)) + redis_proc_start_port = args.redis_proc_start_port + logging.info("Redis Processes start port: {}".format(redis_proc_start_port)) # TODO: confirm we do have enough cores to run the spec # availabe_cpus = args.cpu_count @@ -211,6 +213,7 @@ def main(): profilers_list, grafana_profile_dashboard, cpuset_start_pos, + redis_proc_start_port, ) @@ -256,6 +259,7 @@ def self_contained_coordinator_blocking_read( profilers_list, grafana_profile_dashboard="", cpuset_start_pos=0, + redis_proc_start_port=6379, ): num_process_streams = 0 num_process_test_suites = 0 @@ -291,6 +295,7 @@ def self_contained_coordinator_blocking_read( profilers_list, grafana_profile_dashboard, cpuset_start_pos, + redis_proc_start_port, ) num_process_streams = num_process_streams + 1 num_process_test_suites = num_process_test_suites + total_test_suite_runs @@ -357,6 +362,7 @@ def process_self_contained_coordinator_stream( profilers_list=[], grafana_profile_dashboard="", cpuset_start_pos=0, + redis_proc_start_port=6379, ): stream_id = "n/a" overall_result = False @@ -464,11 +470,10 @@ def process_self_contained_coordinator_stream( restore_build_artifacts_from_test_details( build_artifacts, conn, temporary_dir, testDetails ) - port = 6379 mnt_point = "/mnt/redis/" command = generate_standalone_redis_server_args( "{}redis-server".format(mnt_point), - port, + redis_proc_start_port, mnt_point, redis_configuration_parameters, ) @@ -735,9 +740,6 @@ def process_self_contained_coordinator_stream( "r", ) as json_file: results_dict = json.load(json_file) - logging.info( - "Final JSON result {}".format(results_dict) - ) dataset_load_duration_seconds = 0 logging.error( diff --git a/utils/tests/test_app.py b/utils/tests/test_app.py index 26ed297..284ed27 100644 --- a/utils/tests/test_app.py +++ b/utils/tests/test_app.py @@ -9,7 +9,11 @@ import redis -from redis_benchmarks_specification.__api__.app import create_app, SIG_HEADER +from redis_benchmarks_specification.__api__.app import ( + create_app, + SIG_HEADER, + should_action, +) from redis_benchmarks_specification.__common__.env import ( STREAM_KEYNAME_GH_EVENTS_COMMIT, ) @@ -121,3 +125,12 @@ def test_create_app(): except redis.exceptions.ConnectionError: pass + + +def test_should_action(): + assert should_action("labeled") == True + assert should_action("opened") == True + assert should_action("closed") == False + assert should_action("na") == False + assert should_action("reopened") == True + assert should_action("synchronize") == True diff --git a/utils/tests/test_data/dump.rdb b/utils/tests/test_data/dump.rdb index bcab82e4977e6b293128ddf1c5a1c70e7d4442c4..7cb43879bab3e074bb4b5bd9ab79b3afa57fac1c 100644 GIT binary patch delta 730 zcmXBMNlz027>Dthwjc^hQ7fR*Qi0+^r3;iDcZ5L}#SN{+b^xVT!72M%Xlr2-6A3Z> z3?4iXLVEDR2WVnwLgJBx16NL*NZ@Ha{E{bc@_(cIzjR^zuxV4JORLVZjH6U<;9%`g z(<6QlOWK&E6`?`8b;v*_P9Y1YaR%AQ!C9P3NZQ=pkkR1uIS0L7?|@IPlC5@EwZm2C zve$0eiXF{sJdNZ+k35{m1zdyymynMF6yh?j;3|q>gbBqk;~Gj(iZWPGj_bIAo4ADv zSaBPbu)z)ooTx%IT&O`U>QIjcG@=R3xP!a6hx>Sdhj@e*JVqn_<)ZXf*+p{z-N5H zFh=kd3W6BL7{)PyNlalHGnmC3=CObf7O{jdB8cJ}VpzsXV$ZEM8N{NvSyA)#zOkV| ze^As5f*4Bn?WEQh{hG{l2twSXs1{w)BX7jp6m|Q58G~whR{F-k5;q4`Q=xT48J0`z Vo3bYv5(Pmx{{1)aPerUVdIB6mE&Bif delta 710 zcmXBNOLI$M0LJl?;LEN>W>e8wZiZqqprB13YMHBT3$3nX> zXS(PIFvE1-g~`^Y_B9MkyM6#mX830;el!1hHqY$pJ5^xL@963rm=AdEF1O_|%nEBU zWtOPX&kck54=HoRUR+2;`ICJAWqQ7^$Mz;Gg|rE27t$f5D&!g=*9z$rvPj5vLarCG zSjZ9~Hwd}$qjdeu)Rf1QT1$VhP1h5lxKC>h`a=O-4>f<%6n|6LF_~M+y08hGu?3~r ziZYa=0^3lD?bv}TxKRxcYOoW#P>bF0q7LrVS3f*vh$nOVVEobt14~Q7Zo-|vDI0g fwCSnzO&F;}t@hoy9L?AiMftn%%RRa(e^31bEw?e@ From 33c369e253c2e533a8e4895a4ab65d86b592b8ce Mon Sep 17 00:00:00 2001 From: filipecosta90 Date: Mon, 16 May 2022 13:10:01 +0100 Subject: [PATCH 2/4] Fixed flake8 check on port/redis_proc_start_port --- .../self_contained_coordinator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/redis_benchmarks_specification/__self_contained_coordinator__/self_contained_coordinator.py b/redis_benchmarks_specification/__self_contained_coordinator__/self_contained_coordinator.py index 6b03cf9..c86d100 100644 --- a/redis_benchmarks_specification/__self_contained_coordinator__/self_contained_coordinator.py +++ b/redis_benchmarks_specification/__self_contained_coordinator__/self_contained_coordinator.py @@ -523,7 +523,7 @@ def process_self_contained_coordinator_stream( client_cpuset_cpus, docker_client, git_hash, - port, + redis_proc_start_port, temporary_dir, test_name, ) @@ -563,7 +563,7 @@ def process_self_contained_coordinator_stream( ) = prepare_benchmark_parameters( benchmark_config, full_benchmark_path, - port, + redis_proc_start_port, "localhost", local_benchmark_output_filename, False, @@ -577,7 +577,7 @@ def process_self_contained_coordinator_stream( ) = prepare_memtier_benchmark_parameters( benchmark_config["clientconfig"], full_benchmark_path, - port, + redis_proc_start_port, "localhost", local_benchmark_output_filename, benchmark_tool_workdir, From 012077515e06d03b364980f2daad43a1261f0c5e Mon Sep 17 00:00:00 2001 From: filipecosta90 Date: Mon, 16 May 2022 13:20:18 +0100 Subject: [PATCH 3/4] Updated redisbench-admin to 0.8.10 --- poetry.lock | 110 ++---------------- redis_benchmarks_specification/__api__/app.py | 29 ++++- 2 files changed, 33 insertions(+), 106 deletions(-) diff --git a/poetry.lock b/poetry.lock index 0ceecbf..0cf9fa7 100644 --- a/poetry.lock +++ b/poetry.lock @@ -493,18 +493,6 @@ python-versions = ">=3.6" gitdb = ">=4.0.1,<5" typing-extensions = {version = ">=3.7.4.3", markers = "python_version < \"3.10\""} -[[package]] -name = "h5py" -version = "2.10.0" -description = "Read and write HDF5 files from Python" -category = "main" -optional = false -python-versions = "*" - -[package.dependencies] -numpy = ">=1.7" -six = "*" - [[package]] name = "html5lib" version = "1.1" @@ -614,14 +602,6 @@ category = "main" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" -[[package]] -name = "joblib" -version = "1.1.0" -description = "Lightweight pipelining with Python functions" -category = "main" -optional = false -python-versions = ">=3.6" - [[package]] name = "jsonpath-ng" version = "1.5.3" @@ -1135,7 +1115,7 @@ from = ["pytablereader (>=0.31.3,<2)"] html = ["dominate (>=2.1.5,<3)"] logging = ["loguru (>=0.4.1,<1)"] sqlite = ["SimpleSQLite (>=1.1.3,<2)"] -test = ["pytest (>=6.0.1)", "pytablereader (>=0.31.3,<2)", "idna (<3)", "xlwt", "pytablewriter-altrow-theme (>=0.0.2,<1)", "loguru (>=0.4.1,<1)", "pytest-md-report (>=0.1)", "beautifulsoup4 (>=4.10)", "XlsxWriter (>=0.9.6,<4)", "tablib (>=3.2.0)", "elasticsearch (>=7.0.5,<8)", "dominate (>=2.1.5,<3)", "PyYAML (>=3.11,<7)", "simplejson (>=3.8.1,<4)", "sqliteschema (>=1.3.0)", "pytablereader[sqlite,excel] (>=0.31.3)", "toml (>=0.9.3,<1)", "SimpleSQLite (>=1.1.3,<2)"] +test = ["pytest (>=6.0.1)", "pytablereader (>=0.31.3,<2)", "idna (<3)", "xlwt", "pytablewriter-altrow-theme (>=0.0.2,<1)", "loguru (>=0.4.1,<1)", "pytest-md-report (>=0.1)", "beautifulsoup4 (>=4.10)", "XlsxWriter (>=0.9.6,<4)", "tablib (>=3.2.0)", "elasticsearch (>=7.0.5,<8)", "dominate (>=2.1.5,<3)", "PyYAML (>=3.11,<7)", "simplejson (>=3.8.1,<4)", "sqliteschema (>=1.3.0)", "pytablereader[excel,sqlite] (>=0.31.3)", "toml (>=0.9.3,<1)", "SimpleSQLite (>=1.1.3,<2)"] theme = ["pytablewriter-altrow-theme (>=0.0.2,<1)"] toml = ["toml (>=0.9.3,<1)"] yaml = ["PyYAML (>=3.11,<7)"] @@ -1259,7 +1239,7 @@ ocsp = ["cryptography (>=36.0.1)", "pyopenssl (==20.0.1)", "requests (>=2.26.0)" [[package]] name = "redisbench-admin" -version = "0.8.6" +version = "0.8.10" description = "Redis benchmark run helper. A wrapper around Redis and Redis Modules benchmark tools ( ftsb_redisearch, memtier_benchmark, redis-benchmark, aibench, etc... )." category = "main" optional = false @@ -1275,7 +1255,6 @@ Flask = ">=2.0.1,<3.0.0" Flask-HTTPAuth = ">=4.4.0,<5.0.0" flask-restx = ">=0.5.1,<0.6.0" GitPython = ">=3.1.12,<4.0.0" -h5py = ">=2.10.0,<3.0.0" humanize = ">=2.4.0,<3.0.0" Jinja2 = ">=3.0.3,<4.0.0" jsonpath_ng = ">=1.5.2,<2.0.0" @@ -1292,7 +1271,6 @@ pyWorkFlow = ">=0.0.2,<0.0.3" PyYAML = ">=5.4,<6.0" redis = "4.2.2" requests = ">=2.23.0,<3.0.0" -scikit-learn = ">=0.22.2,<0.23.0" scipy = ">=1.3.3,<2.0.0" slack-bolt = ">=1.13.0,<2.0.0" slack-sdk = ">=3.15.2,<4.0.0" @@ -1354,22 +1332,6 @@ botocore = ">=1.12.36,<2.0a.0" [package.extras] crt = ["botocore[crt] (>=1.20.29,<2.0a.0)"] -[[package]] -name = "scikit-learn" -version = "0.22.2.post1" -description = "A set of python modules for machine learning and data mining" -category = "main" -optional = false -python-versions = ">=3.5" - -[package.dependencies] -joblib = ">=0.11" -numpy = ">=1.11.0" -scipy = ">=0.17.0" - -[package.extras] -alldeps = ["numpy (>=1.11.0)", "scipy (>=0.17.0)"] - [[package]] name = "scipy" version = "1.5.4" @@ -1551,7 +1513,7 @@ tox = ">=3.0.0,<4.0" [[package]] name = "tox-poetry-installer" -version = "0.8.3" +version = "0.8.4" description = "A plugin for Tox that lets you install test environment dependencies from the Poetry lockfile" category = "dev" optional = false @@ -2021,37 +1983,6 @@ gitpython = [ {file = "GitPython-3.1.20-py3-none-any.whl", hash = "sha256:b1e1c269deab1b08ce65403cf14e10d2ef1f6c89e33ea7c5e5bb0222ea593b8a"}, {file = "GitPython-3.1.20.tar.gz", hash = "sha256:df0e072a200703a65387b0cfdf0466e3bab729c0458cf6b7349d0e9877636519"}, ] -h5py = [ - {file = "h5py-2.10.0-cp27-cp27m-macosx_10_6_intel.whl", hash = "sha256:ecf4d0b56ee394a0984de15bceeb97cbe1fe485f1ac205121293fc44dcf3f31f"}, - {file = "h5py-2.10.0-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:86868dc07b9cc8cb7627372a2e6636cdc7a53b7e2854ad020c9e9d8a4d3fd0f5"}, - {file = "h5py-2.10.0-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:aac4b57097ac29089f179bbc2a6e14102dd210618e94d77ee4831c65f82f17c0"}, - {file = "h5py-2.10.0-cp27-cp27m-win32.whl", hash = "sha256:7be5754a159236e95bd196419485343e2b5875e806fe68919e087b6351f40a70"}, - {file = "h5py-2.10.0-cp27-cp27m-win_amd64.whl", hash = "sha256:13c87efa24768a5e24e360a40e0bc4c49bcb7ce1bb13a3a7f9902cec302ccd36"}, - {file = "h5py-2.10.0-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:79b23f47c6524d61f899254f5cd5e486e19868f1823298bc0c29d345c2447172"}, - {file = "h5py-2.10.0-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:cbf28ae4b5af0f05aa6e7551cee304f1d317dbed1eb7ac1d827cee2f1ef97a99"}, - {file = "h5py-2.10.0-cp34-cp34m-manylinux1_i686.whl", hash = "sha256:c0d4b04bbf96c47b6d360cd06939e72def512b20a18a8547fa4af810258355d5"}, - {file = "h5py-2.10.0-cp34-cp34m-manylinux1_x86_64.whl", hash = "sha256:549ad124df27c056b2e255ea1c44d30fb7a17d17676d03096ad5cd85edb32dc1"}, - {file = "h5py-2.10.0-cp35-cp35m-macosx_10_6_intel.whl", hash = "sha256:a5f82cd4938ff8761d9760af3274acf55afc3c91c649c50ab18fcff5510a14a5"}, - {file = "h5py-2.10.0-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:3dad1730b6470fad853ef56d755d06bb916ee68a3d8272b3bab0c1ddf83bb99e"}, - {file = "h5py-2.10.0-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:063947eaed5f271679ed4ffa36bb96f57bc14f44dd4336a827d9a02702e6ce6b"}, - {file = "h5py-2.10.0-cp35-cp35m-win32.whl", hash = "sha256:c54a2c0dd4957776ace7f95879d81582298c5daf89e77fb8bee7378f132951de"}, - {file = "h5py-2.10.0-cp35-cp35m-win_amd64.whl", hash = "sha256:6998be619c695910cb0effe5eb15d3a511d3d1a5d217d4bd0bebad1151ec2262"}, - {file = "h5py-2.10.0-cp36-cp36m-macosx_10_6_intel.whl", hash = "sha256:ff7d241f866b718e4584fa95f520cb19405220c501bd3a53ee11871ba5166ea2"}, - {file = "h5py-2.10.0-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:54817b696e87eb9e403e42643305f142cd8b940fe9b3b490bbf98c3b8a894cf4"}, - {file = "h5py-2.10.0-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:d3c59549f90a891691991c17f8e58c8544060fdf3ccdea267100fa5f561ff62f"}, - {file = "h5py-2.10.0-cp36-cp36m-win32.whl", hash = "sha256:d7ae7a0576b06cb8e8a1c265a8bc4b73d05fdee6429bffc9a26a6eb531e79d72"}, - {file = "h5py-2.10.0-cp36-cp36m-win_amd64.whl", hash = "sha256:bffbc48331b4a801d2f4b7dac8a72609f0b10e6e516e5c480a3e3241e091c878"}, - {file = "h5py-2.10.0-cp37-cp37m-macosx_10_6_intel.whl", hash = "sha256:51ae56894c6c93159086ffa2c94b5b3388c0400548ab26555c143e7cfa05b8e5"}, - {file = "h5py-2.10.0-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:16ead3c57141101e3296ebeed79c9c143c32bdd0e82a61a2fc67e8e6d493e9d1"}, - {file = "h5py-2.10.0-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:f0e25bb91e7a02efccb50aba6591d3fe2c725479e34769802fcdd4076abfa917"}, - {file = "h5py-2.10.0-cp37-cp37m-win32.whl", hash = "sha256:f23951a53d18398ef1344c186fb04b26163ca6ce449ebd23404b153fd111ded9"}, - {file = "h5py-2.10.0-cp37-cp37m-win_amd64.whl", hash = "sha256:8bb1d2de101f39743f91512a9750fb6c351c032e5cd3204b4487383e34da7f75"}, - {file = "h5py-2.10.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:64f74da4a1dd0d2042e7d04cf8294e04ddad686f8eba9bb79e517ae582f6668d"}, - {file = "h5py-2.10.0-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:d35f7a3a6cefec82bfdad2785e78359a0e6a5fbb3f605dd5623ce88082ccd681"}, - {file = "h5py-2.10.0-cp38-cp38-win32.whl", hash = "sha256:6ef7ab1089e3ef53ca099038f3c0a94d03e3560e6aff0e9d6c64c55fb13fc681"}, - {file = "h5py-2.10.0-cp38-cp38-win_amd64.whl", hash = "sha256:769e141512b54dee14ec76ed354fcacfc7d97fea5a7646b709f7400cf1838630"}, - {file = "h5py-2.10.0.tar.gz", hash = "sha256:84412798925dc870ffd7107f045d7659e60f5d46d1c70c700375248bf6bf512d"}, -] html5lib = [ {file = "html5lib-1.1-py2.py3-none-any.whl", hash = "sha256:0d78f8fde1c230e99fe37986a60526d7049ed4bf8a9fadbad5f00e22e58e041d"}, {file = "html5lib-1.1.tar.gz", hash = "sha256:b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f"}, @@ -2088,10 +2019,6 @@ jmespath = [ {file = "jmespath-0.10.0-py2.py3-none-any.whl", hash = "sha256:cdf6525904cc597730141d61b36f2e4b8ecc257c420fa2f4549bac2c2d0cb72f"}, {file = "jmespath-0.10.0.tar.gz", hash = "sha256:b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9"}, ] -joblib = [ - {file = "joblib-1.1.0-py2.py3-none-any.whl", hash = "sha256:f21f109b3c7ff9d95f8387f752d0d9c34a02aa2f7060c2135f465da0e5160ff6"}, - {file = "joblib-1.1.0.tar.gz", hash = "sha256:4158fcecd13733f8be669be0683b96ebdbbd38d23559f54dca7205aea1bf1e35"}, -] jsonpath-ng = [ {file = "jsonpath-ng-1.5.3.tar.gz", hash = "sha256:a273b182a82c1256daab86a313b937059261b5c5f8c4fa3fc38b882b344dd567"}, {file = "jsonpath_ng-1.5.3-py2-none-any.whl", hash = "sha256:f75b95dbecb8a0f3b86fd2ead21c2b022c3f5770957492b9b6196ecccfeb10aa"}, @@ -2650,8 +2577,8 @@ redis = [ {file = "redis-4.2.2.tar.gz", hash = "sha256:0107dc8e98a4f1d1d4aa00100e044287f77121a1e6d2085545c4b7fa94a7a27f"}, ] redisbench-admin = [ - {file = "redisbench-admin-0.8.6.tar.gz", hash = "sha256:95ff05b739784f2a8b4cc49658a40a4eda5ad6ca83db98e0b3a846524994aa75"}, - {file = "redisbench_admin-0.8.6-py3-none-any.whl", hash = "sha256:118f9994566042c024d06caa93685f42892011e40929f91b465860fdea8e710a"}, + {file = "redisbench-admin-0.8.10.tar.gz", hash = "sha256:c551f29d753b4630c5b2369714a258801655e6643c15d340ffcad6f1676595ca"}, + {file = "redisbench_admin-0.8.10-py3-none-any.whl", hash = "sha256:a5ca25d6d62ea78dc14de4ea763b160fd0c8db0e052e246b472eb8e7b73e16e4"}, ] regex = [ {file = "regex-2022.3.15-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:42eb13b93765c6698a5ab3bcd318d8c39bb42e5fa8a7fcf7d8d98923f3babdb1"}, @@ -2741,29 +2668,6 @@ s3transfer = [ {file = "s3transfer-0.5.2-py3-none-any.whl", hash = "sha256:7a6f4c4d1fdb9a2b640244008e142cbc2cd3ae34b386584ef044dd0f27101971"}, {file = "s3transfer-0.5.2.tar.gz", hash = "sha256:95c58c194ce657a5f4fb0b9e60a84968c808888aed628cd98ab8771fe1db98ed"}, ] -scikit-learn = [ - {file = "scikit-learn-0.22.2.post1.tar.gz", hash = "sha256:57538d138ba54407d21e27c306735cbd42a6aae0df6a5a30c7a6edde46b0017d"}, - {file = "scikit_learn-0.22.2.post1-cp35-cp35m-macosx_10_9_intel.whl", hash = "sha256:267ad874b54c67b479c3b45eb132ef4a56ab2b27963410624a413a4e2a3fc388"}, - {file = "scikit_learn-0.22.2.post1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:8ed66ab27b3d68e57bb1f315fc35e595a5c4a1f108c3420943de4d18fc40e615"}, - {file = "scikit_learn-0.22.2.post1-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:4990f0e166292d2a0f0ee528233723bcfd238bfdb3ec2512a9e27f5695362f35"}, - {file = "scikit_learn-0.22.2.post1-cp35-cp35m-win32.whl", hash = "sha256:ddd3bf82977908ff69303115dd5697606e669d8a7eafd7d83bb153ef9e11bd5e"}, - {file = "scikit_learn-0.22.2.post1-cp35-cp35m-win_amd64.whl", hash = "sha256:349ba3d837fb3f7cb2b91486c43713e4b7de17f9e852f165049b1b7ac2f81478"}, - {file = "scikit_learn-0.22.2.post1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:73207dca6e70f8f611f28add185cf3a793c8232a1722f21d82259560dc35cd50"}, - {file = "scikit_learn-0.22.2.post1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:de9933297f8659ee3bb330eafdd80d74cd73d5dab39a9026b65a4156bc479063"}, - {file = "scikit_learn-0.22.2.post1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:6043e2c4ccfc68328c331b0fc19691be8fb02bd76d694704843a23ad651de902"}, - {file = "scikit_learn-0.22.2.post1-cp36-cp36m-win32.whl", hash = "sha256:8416150ab505f1813da02cdbdd9f367b05bfc75cf251235015bb09f8674358a0"}, - {file = "scikit_learn-0.22.2.post1-cp36-cp36m-win_amd64.whl", hash = "sha256:a7f8aa93f61aaad080b29a9018db93ded0586692c03ddf2122e47dd1d3a14e1b"}, - {file = "scikit_learn-0.22.2.post1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:eb4c9f0019abb374a2e55150f070a333c8f990b850d1eb4dfc2765fc317ffc7c"}, - {file = "scikit_learn-0.22.2.post1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:ffce8abfdcd459e72e5b91727b247b401b22253cbd18d251f842a60e26262d6f"}, - {file = "scikit_learn-0.22.2.post1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:84e759a766c315deb5c85139ff879edbb0aabcddb9358acf499564ed1c21e337"}, - {file = "scikit_learn-0.22.2.post1-cp37-cp37m-win32.whl", hash = "sha256:5b722e8bb708f254af028dc2da86d23df5371cba57e24f889b672e7b15423caa"}, - {file = "scikit_learn-0.22.2.post1-cp37-cp37m-win_amd64.whl", hash = "sha256:3f4d8eea3531d3eaf613fa33f711113dfff6021d57a49c9d319af4afb46f72f0"}, - {file = "scikit_learn-0.22.2.post1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2d1bb83d6c51a81193d8a6b5f31930e2959c0e1019d49bdd03f54163735dae4b"}, - {file = "scikit_learn-0.22.2.post1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:ea91a70a992ada395efc3d510cf011dc2d99dc9037bb38cd1cb00e14745005f5"}, - {file = "scikit_learn-0.22.2.post1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:83fc104a799cb340054e485c25dfeee712b36f5638fb374eba45a9db490f16ff"}, - {file = "scikit_learn-0.22.2.post1-cp38-cp38-win32.whl", hash = "sha256:1bf45e62799b6938357cfce19f72e3751448c4b27010e4f98553da669b5bbd86"}, - {file = "scikit_learn-0.22.2.post1-cp38-cp38-win_amd64.whl", hash = "sha256:672ea38eb59b739a8907ec063642b486bcb5a2073dda5b72b7983eeaf1fd67c1"}, -] scipy = [ {file = "scipy-1.5.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:4f12d13ffbc16e988fa40809cbbd7a8b45bc05ff6ea0ba8e3e41f6f4db3a9e47"}, {file = "scipy-1.5.4-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:a254b98dbcc744c723a838c03b74a8a34c0558c9ac5c86d5561703362231107d"}, @@ -2849,8 +2753,8 @@ tox-docker = [ {file = "tox_docker-3.1.0-py2.py3-none-any.whl", hash = "sha256:3080c436f7fdfb5a7446215aee620638489ccd7abf812d38b6fb860337efd6f2"}, ] tox-poetry-installer = [ - {file = "tox-poetry-installer-0.8.3.tar.gz", hash = "sha256:04b6c7d368b67ef3cc4409e275b26eef3564a6487259bd9cc671587f5aaf4b4f"}, - {file = "tox_poetry_installer-0.8.3-py3-none-any.whl", hash = "sha256:4cefad997ef5b8533811ceb5308b5cb6e6d6997af377c0b7d03b2dd43179c235"}, + {file = "tox-poetry-installer-0.8.4.tar.gz", hash = "sha256:c1d4e25768c127c577c0930dec9a82e107a5c2c3b1ec60b95c88dbd2695ba6aa"}, + {file = "tox_poetry_installer-0.8.4-py3-none-any.whl", hash = "sha256:fb67d78794a5aeedcaf34b0db7440f089076a17400f950665a95eed3d87781d0"}, ] tqdm = [ {file = "tqdm-4.64.0-py2.py3-none-any.whl", hash = "sha256:74a2cdefe14d11442cedf3ba4e21a3b84ff9a2dbdc6cfae2c34addb2a14a5ea6"}, diff --git a/redis_benchmarks_specification/__api__/app.py b/redis_benchmarks_specification/__api__/app.py index f0a164a..573f72c 100644 --- a/redis_benchmarks_specification/__api__/app.py +++ b/redis_benchmarks_specification/__api__/app.py @@ -102,6 +102,7 @@ def base(): ) # Git pushes to repo + before_sha = None if "ref" in request_data: repo_dict = request_data["repository"] html_url = repo_dict["html_url"].split("/") @@ -110,11 +111,33 @@ def base(): ref = request_data["ref"].split("/")[-1] ref_label = request_data["ref"] sha = request_data["after"] + before_sha = request_data["before"] use_event = True event_type = "Git pushes to repo" if use_event is True: - fields = { + if before_sha is not None: + fields_before = { + "git_hash": sha, + "ref_label": ref_label, + "ref": ref, + "gh_repo": gh_repo, + "gh_org": gh_org, + } + app.logger.info( + "Using event {} to trigger merge-base commit benchmark. final fields: {}".format( + event_type, fields_before + ) + ) + result, response_data, err_message = commit_schema_to_stream( + fields_before, conn, gh_org, gh_repo + ) + app.logger.info( + "Using event {} to trigger merge-base commit benchmark. final fields: {}".format( + event_type, response_data + ) + ) + fields_after = { "git_hash": sha, "ref_label": ref_label, "ref": ref, @@ -123,11 +146,11 @@ def base(): } app.logger.info( "Using event {} to trigger benchmark. final fields: {}".format( - event_type, fields + event_type, fields_after ) ) result, response_data, err_message = commit_schema_to_stream( - fields, conn, gh_org, gh_repo + fields_after, conn, gh_org, gh_repo ) app.logger.info( "Using event {} to trigger benchmark. final fields: {}".format( From c3e6ccbaf1d9807f8496ec3adeedd28f23f5528a Mon Sep 17 00:00:00 2001 From: filipecosta90 Date: Mon, 16 May 2022 17:20:29 +0100 Subject: [PATCH 4/4] Bumped redisbench-admin deps. Fixed failing tests after upgrade of deps/spec --- poetry.lock | 10 +++++----- pyproject.toml | 2 +- .../self_contained_coordinator.py | 2 +- utils/tests/test_data/dump.rdb | Bin 9073539 -> 9073539 bytes ...test_self_contained_coordinator_memtier.py | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/poetry.lock b/poetry.lock index 0cf9fa7..5dfe160 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1239,7 +1239,7 @@ ocsp = ["cryptography (>=36.0.1)", "pyopenssl (==20.0.1)", "requests (>=2.26.0)" [[package]] name = "redisbench-admin" -version = "0.8.10" +version = "0.9.3" description = "Redis benchmark run helper. A wrapper around Redis and Redis Modules benchmark tools ( ftsb_redisearch, memtier_benchmark, redis-benchmark, aibench, etc... )." category = "main" optional = false @@ -1269,7 +1269,7 @@ pytablewriter = {version = ">=0.64.1,<0.65.0", extras = ["html"]} python_terraform = ">=0.10.1,<0.11.0" pyWorkFlow = ">=0.0.2,<0.0.3" PyYAML = ">=5.4,<6.0" -redis = "4.2.2" +redis = ">=4.2.2,<5.0.0" requests = ">=2.23.0,<3.0.0" scipy = ">=1.3.3,<2.0.0" slack-bolt = ">=1.13.0,<2.0.0" @@ -1697,7 +1697,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes [metadata] lock-version = "1.1" python-versions = "^3.6.1" -content-hash = "a9fca5a50ac68388ad7a66aff1673ffaa6ce3b5dab283743e6e92f6d70ee64f8" +content-hash = "2cb3ceb1b193488c0fdd548f087f0d62a1445e0070856e8ff5145e89845ca62f" [metadata.files] aniso8601 = [ @@ -2577,8 +2577,8 @@ redis = [ {file = "redis-4.2.2.tar.gz", hash = "sha256:0107dc8e98a4f1d1d4aa00100e044287f77121a1e6d2085545c4b7fa94a7a27f"}, ] redisbench-admin = [ - {file = "redisbench-admin-0.8.10.tar.gz", hash = "sha256:c551f29d753b4630c5b2369714a258801655e6643c15d340ffcad6f1676595ca"}, - {file = "redisbench_admin-0.8.10-py3-none-any.whl", hash = "sha256:a5ca25d6d62ea78dc14de4ea763b160fd0c8db0e052e246b472eb8e7b73e16e4"}, + {file = "redisbench-admin-0.9.3.tar.gz", hash = "sha256:df670363950ce9c09ba22148c24af9558ea6918f1181022644c1bf690ef2f231"}, + {file = "redisbench_admin-0.9.3-py3-none-any.whl", hash = "sha256:2e2824fb075c1065d8983c46d9fa36e5f74cb7c4a98b029622885d60ffea9217"}, ] regex = [ {file = "regex-2022.3.15-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:42eb13b93765c6698a5ab3bcd318d8c39bb42e5fa8a7fcf7d8d98923f3babdb1"}, diff --git a/pyproject.toml b/pyproject.toml index 130491d..63f5123 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ argparse = "^1.4.0" Flask-HTTPAuth = "^4.4.0" PyYAML = "^5.4.1" docker = "^5.0.0" -redisbench-admin = "^0.8.6" +redisbench-admin = "^0.9.3" #redisbench-admin = {path = "../redisbench-admin", develop = true} psutil = "^5.8.0" tox-docker = "^3.1.0" diff --git a/redis_benchmarks_specification/__self_contained_coordinator__/self_contained_coordinator.py b/redis_benchmarks_specification/__self_contained_coordinator__/self_contained_coordinator.py index c86d100..7964654 100644 --- a/redis_benchmarks_specification/__self_contained_coordinator__/self_contained_coordinator.py +++ b/redis_benchmarks_specification/__self_contained_coordinator__/self_contained_coordinator.py @@ -742,7 +742,7 @@ def process_self_contained_coordinator_stream( results_dict = json.load(json_file) dataset_load_duration_seconds = 0 - logging.error( + logging.info( "Using datapoint_time_ms: {}".format(datapoint_time_ms) ) diff --git a/utils/tests/test_data/dump.rdb b/utils/tests/test_data/dump.rdb index 7cb43879bab3e074bb4b5bd9ab79b3afa57fac1c..04b1ad7a8a482ca50c1229376dbba61ee3d294f1 100644 GIT binary patch delta 721 zcmXBIOK=Nu0D$pLx+OG3(WaF~&`P~Rw&^A<^(dn(QWb<_R>1- z!IZ1Vbev4??m0NPFg-ix;$Uj{Iu5^?Z@&D`_i7$f(b`#aV&J!DESDaPWYU>0!+&0N z``x~v6EbbTGo7`)YI*9@kJ3!m9&y*qr=rY#c>B6iOr``b;WDn^Dh6O+5NQnI8isKl zBe;Q^$lw;T7{zUv$l(sga2NM*9}n;lkMI~z@D$H54hs{=qX3ELDB=ZPmXayEtFC(P zdu+O52`OAsxTUC)LY1OgiUm?El)@v$A}JP2Q6q&{iX~Dk{VaUCRo~IBYl*0#4aGZS z5iPE_CA7Gvm)=>vo+?!_TD-+d!G~q2#d55`O4Okqel(yFs}MjFf>@0Z)?h8xp&2b$ zk1$%X0UNOio3RBEY{fQ2p`i^iv_nT633Q+n+pz;(*oj@(jXmhbUhKnu^xyz`k;Fk9 z!eJc2Q5?f@oWM!+;S^5e4Ek{v=Wre=Tqsov7yG_BLDLSa<;lQDr`NQ<{;#H--RhZt kisA}8p`0CRjEtIDqgk5?OqR!8ilY3TebbP(`i)=z0Bw~?(*OVf delta 741 zcmXBPNlz027{>AGFx9%!s?Z`}RS-}arIfayRYX8sQP~uiVrN>E+6vBC#k~tKIww3e zCVT;7JQ!kn@aB~!h9-OluAF)>B>HbW{PH|`^Io3p`WGpS#WqK=F{AvkCG}`TPDB&G zX1{*waauQvAPfa6B8XxV5Ag_7h~Y8fNZ<*kF@vYjP~P_pNj%33 z%;F_p;WggiE#BchQb;3%Eaote1sM2{Us?J%v}WC0UXN{LOQKN{EhuLNBv`QpTVcaC zY{w4l#4hYcCG2ou5B6dos!$ClT&Tf*)S?dcH~=>e;t&p_0gX6Seox0lsa$fkn%N>1Lh5pEKr>hWw>sTywv}(Z iH|5;A>8_Dyv}v`$^Fs|4QWilF{(k%I_}OX<&i@1Y7*y^6 diff --git a/utils/tests/test_self_contained_coordinator_memtier.py b/utils/tests/test_self_contained_coordinator_memtier.py index 656f52e..def776b 100644 --- a/utils/tests/test_self_contained_coordinator_memtier.py +++ b/utils/tests/test_self_contained_coordinator_memtier.py @@ -89,9 +89,9 @@ def test_self_contained_coordinator_blocking_read(): tf_triggering_env = "ci" deployment_name = "oss-standalone" deployment_type = "oss-standalone" - use_metric_context_path = True - metric_context_path = "Gets" - for metric_name in ["Latency", "Ops/sec"]: + use_metric_context_path = False + metric_context_path = None + for metric_name in ["ALL_STATS.Totals.Latency", "ALL_STATS.Totals.Ops/sec"]: ts_key_name = get_ts_metric_name( "by.branch", "unstable",