redis-benchmarks-specification 0.2.42__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- redis_benchmarks_specification/__api__/Readme.md +7 -0
- redis_benchmarks_specification/__api__/__init__.py +5 -0
- redis_benchmarks_specification/__api__/api.py +87 -0
- redis_benchmarks_specification/__api__/app.py +191 -0
- redis_benchmarks_specification/__builder__/Readme.md +7 -0
- redis_benchmarks_specification/__builder__/__init__.py +5 -0
- redis_benchmarks_specification/__builder__/builder.py +1010 -0
- redis_benchmarks_specification/__builder__/schema.py +23 -0
- redis_benchmarks_specification/__cli__/__init__.py +5 -0
- redis_benchmarks_specification/__cli__/args.py +226 -0
- redis_benchmarks_specification/__cli__/cli.py +624 -0
- redis_benchmarks_specification/__cli__/stats.py +1304 -0
- redis_benchmarks_specification/__common__/__init__.py +0 -0
- redis_benchmarks_specification/__common__/builder_schema.py +256 -0
- redis_benchmarks_specification/__common__/env.py +96 -0
- redis_benchmarks_specification/__common__/github.py +280 -0
- redis_benchmarks_specification/__common__/package.py +28 -0
- redis_benchmarks_specification/__common__/runner.py +485 -0
- redis_benchmarks_specification/__common__/spec.py +143 -0
- redis_benchmarks_specification/__common__/suppress_warnings.py +20 -0
- redis_benchmarks_specification/__common__/timeseries.py +1621 -0
- redis_benchmarks_specification/__compare__/__init__.py +5 -0
- redis_benchmarks_specification/__compare__/args.py +240 -0
- redis_benchmarks_specification/__compare__/compare.py +3322 -0
- redis_benchmarks_specification/__init__.py +15 -0
- redis_benchmarks_specification/__runner__/__init__.py +5 -0
- redis_benchmarks_specification/__runner__/args.py +334 -0
- redis_benchmarks_specification/__runner__/remote_profiling.py +535 -0
- redis_benchmarks_specification/__runner__/runner.py +3837 -0
- redis_benchmarks_specification/__self_contained_coordinator__/__init__.py +5 -0
- redis_benchmarks_specification/__self_contained_coordinator__/args.py +210 -0
- redis_benchmarks_specification/__self_contained_coordinator__/artifacts.py +27 -0
- redis_benchmarks_specification/__self_contained_coordinator__/build_info.py +61 -0
- redis_benchmarks_specification/__self_contained_coordinator__/clients.py +58 -0
- redis_benchmarks_specification/__self_contained_coordinator__/cpuset.py +17 -0
- redis_benchmarks_specification/__self_contained_coordinator__/docker.py +108 -0
- redis_benchmarks_specification/__self_contained_coordinator__/post_processing.py +19 -0
- redis_benchmarks_specification/__self_contained_coordinator__/prepopulation.py +96 -0
- redis_benchmarks_specification/__self_contained_coordinator__/runners.py +740 -0
- redis_benchmarks_specification/__self_contained_coordinator__/self_contained_coordinator.py +2554 -0
- redis_benchmarks_specification/__setups__/__init__.py +0 -0
- redis_benchmarks_specification/__setups__/topologies.py +17 -0
- redis_benchmarks_specification/__spec__/__init__.py +5 -0
- redis_benchmarks_specification/__spec__/args.py +78 -0
- redis_benchmarks_specification/__spec__/cli.py +259 -0
- redis_benchmarks_specification/__watchdog__/__init__.py +5 -0
- redis_benchmarks_specification/__watchdog__/args.py +54 -0
- redis_benchmarks_specification/__watchdog__/watchdog.py +175 -0
- redis_benchmarks_specification/commands/__init__.py +0 -0
- redis_benchmarks_specification/commands/commands.py +15 -0
- redis_benchmarks_specification/setups/builders/gcc:15.2.0-amd64-debian-bookworm-default.yml +20 -0
- redis_benchmarks_specification/setups/builders/gcc:15.2.0-arm64-debian-bookworm-default.yml +20 -0
- redis_benchmarks_specification/setups/platforms/aws-ec2-1node-c5.4xlarge.yml +27 -0
- redis_benchmarks_specification/setups/topologies/topologies.yml +153 -0
- redis_benchmarks_specification/test-suites/defaults.yml +32 -0
- redis_benchmarks_specification/test-suites/generate.py +114 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-hash-hexpire-5-fields-10B-values.yml +43 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-hash-hexpire-50-fields-10B-values.yml +53 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-hash-hexpireat-5-fields-10B-values.yml +43 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-hash-hexpireat-50-fields-10B-values.yml +53 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-hash-hgetall-50-fields-100B-values.yml +52 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-hash-hgetex-5-fields-10B-values.yml +43 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-hash-hgetex-50-fields-10B-values.yml +53 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-hash-hgetex-persist-50-fields-10B-values.yml +53 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-hash-hpexpire-5-fields-10B-values.yml +43 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-hash-hpexpire-50-fields-10B-values.yml +53 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-hash-hpexpireat-5-fields-10B-values.yml +43 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-hash-hpexpireat-50-fields-10B-values.yml +53 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-hash-htll-50-fields-10B-values.yml +53 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-1-fields-with-1000B-values-expiration.yml +35 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-1-fields-with-10B-values-expiration.yml +34 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-1-fields-with-10B-values-long-expiration.yml +35 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-1-fields-with-10B-values-short-expiration.yml +35 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-20-fields-with-1B-values-pipeline-30.yml +43 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-5-fields-with-1000B-values-expiration.yml +36 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-5-fields-with-10B-values-expiration.yml +35 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-5-fields-with-10B-values-long-expiration.yml +36 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-5-fields-with-10B-values-short-expiration.yml +36 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-50-fields-with-1000B-values-expiration.yml +45 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-50-fields-with-1000B-values.yml +44 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-50-fields-with-100B-values.yml +44 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-50-fields-with-10B-values-expiration.yml +44 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-50-fields-with-10B-values-long-expiration.yml +45 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-50-fields-with-10B-values-short-expiration.yml +45 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-50-fields-with-10B-values.yml +43 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-10Kkeys-load-hash-50-fields-with-10000B-values.yml +44 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-10Kkeys-load-list-rpush-bulkload-pipeline-50.yml +39 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-10Kkeys-load-list-with-10B-values-pipeline-50.yml +33 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-10Mkeys-load-hash-5-fields-with-100B-values-pipeline-10.yml +33 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-10Mkeys-load-hash-5-fields-with-100B-values.yml +33 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-10Mkeys-load-hash-5-fields-with-10B-values-pipeline-10.yml +34 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-10Mkeys-load-hash-5-fields-with-10B-values.yml +33 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-10Mkeys-string-get-10B-pipeline-100-nokeyprefix.yml +38 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Kkeys-hash-listpack-500-fields-update-20-fields-with-1B-to-64B-values.yml +75 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-100B-expire-use-case.yml +50 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-10B-expire-use-case.yml +50 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-10B-psetex-expire-use-case.yml +43 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-10B-setex-expire-use-case.yml +43 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-1KiB-expire-use-case.yml +49 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-4KiB-expire-use-case.yml +50 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-bitmap-getbit-pipeline-10.yml +42 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-exists-pipeline-10.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-expire-pipeline-10.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-expireat-pipeline-10.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-pexpire-pipeline-10.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-scan-count-500-pipeline-10.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-scan-cursor-count-500-pipeline-10.yml +42 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-scan-cursor-count-5000-pipeline-10.yml +42 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-scan-cursor-pipeline-10.yml +42 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-scan-pipeline-10.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-scan-type-pipeline-10.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-touch-pipeline-10.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-ttl-pipeline-10.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hexists.yml +45 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hget-hgetall-hkeys-hvals-with-100B-values.yml +48 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hgetall-50-fields-10B-values.yml +53 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hincrby.yml +42 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hincrbyfloat.yml +42 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hkeys-10-fields-with-10B-values-with-expiration-pipeline-10.yml +45 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hkeys-5-fields-with-100B-values-with-expiration-pipeline-10.yml +44 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hkeys-5-fields-with-10B-values-with-expiration-pipeline-10.yml +44 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hkeys-50-fields-with-10B-values-with-expiration-pipeline-10.yml +54 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hmget-5-fields-with-100B-values-pipeline-10.yml +44 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-transactions-multi-exec-pipeline-20.yml +43 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-list-lpop-rpop-with-100B-values.yml +44 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-list-lpop-rpop-with-10B-values.yml +44 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-list-lpop-rpop-with-1KiB-values.yml +44 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-list-rpoplpush-with-10B-values.yml +42 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-hash-5-fields-with-1000B-values-pipeline-10.yml +34 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-hash-5-fields-with-1000B-values.yml +33 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-hash-50-fields-with-10B-values-long-expiration-pipeline-10.yml +46 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-hash-hmset-5-fields-with-1000B-values.yml +33 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-list-rpush-with-10B-values.yml +32 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-list-with-100B-values.yml +32 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-list-with-10B-values-pipeline-10.yml +33 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-list-with-10B-values.yml +32 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-list-with-1KiB-values.yml +32 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-set-intset-with-100-elements-19-digits-pipeline-10.yml +58 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-set-intset-with-100-elements-19-digits.yml +58 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-set-intset-with-100-elements-pipeline-10.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-set-intset-with-100-elements.yml +40 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-stream-1-fields-with-100B-values-pipeline-10.yml +33 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-stream-1-fields-with-100B-values.yml +33 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-stream-5-fields-with-100B-values-pipeline-10.yml +34 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-stream-5-fields-with-100B-values.yml +33 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-100B-values-pipeline-10.yml +32 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-100B-values.yml +35 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-10B-values-pipeline-10.yml +33 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-10B-values-pipeline-100-nokeyprefix.yml +29 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-10B-values-pipeline-100.yml +33 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-10B-values-pipeline-50.yml +33 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-10B-values-pipeline-500.yml +33 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-10B-values.yml +32 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-1KiB-values-pipeline-10.yml +32 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-1KiB-values.yml +32 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-20KiB-values.yml +35 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-zset-listpack-with-100-elements-double-score.yml +91 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-zset-with-10-elements-double-score.yml +35 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-zset-with-10-elements-int-score.yml +34 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-append-1-100B-pipeline-10.yml +43 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-append-1-100B.yml +42 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-decr.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-100B-pipeline-10.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-100B.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-10B-pipeline-10.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-10B-pipeline-100-nokeyprefix.yml +38 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-10B-pipeline-100.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-10B-pipeline-50.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-10B-pipeline-500.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-10B.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-1KiB-pipeline-10.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-1KiB.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-32B-pipeline-10.yml +40 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-32B.yml +40 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-incr-pipeline-10.yml +30 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-incrby-pipeline-10.yml +30 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-incrby.yml +30 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-incrbyfloat-pipeline-10.yml +30 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-incrbyfloat.yml +30 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-int-encoding-strlen-pipeline-10.yml +40 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-mget-1KiB.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-mixed-50-50-set-get-100B-expire-pipeline-10.yml +45 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-mixed-50-50-set-get-100B-expire.yml +45 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-mixed-50-50-set-get-100B-pipeline-10.yml +43 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-mixed-50-50-set-get-100B.yml +42 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-mixed-50-50-set-get-1KB-pipeline-10.yml +42 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-mixed-50-50-set-get-1KB.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-mixed-50-50-set-get-32B-pipeline-10.yml +43 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-mixed-50-50-set-get-32B.yml +42 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-mixed-50-50-set-get-512B-pipeline-10.yml +43 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-mixed-50-50-set-get-512B.yml +42 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-mixed-50-50-set-get-with-expiration-240B-400_conns.yml +47 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-set-with-ex-100B-pipeline-10.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-setex-100B-pipeline-10.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-setget200c-1KiB-pipeline-1.yml +43 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-setget200c-1KiB-pipeline-10.yml +43 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-setget200c-4KiB-pipeline-1.yml +43 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-setget200c-4KiB-pipeline-10.yml +43 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-setget200c-512B-pipeline-1.yml +43 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-setget200c-512B-pipeline-10.yml +43 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-setrange-100B-pipeline-10.yml +42 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-setrange-100B.yml +42 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-100M-bits-bitmap-bitcount.yml +45 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-1Billion-bits-bitmap-bitcount.yml +45 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-2-elements-geopos.yml +38 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-2-elements-geosearch-fromlonlat-withcoord.yml +39 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-60M-elements-geodist-pipeline-10.yml +36 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-60M-elements-geodist.yml +36 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-60M-elements-geohash-pipeline-10.yml +35 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-60M-elements-geohash.yml +34 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-60M-elements-geopos-pipeline-10.yml +35 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-60M-elements-geopos.yml +34 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-60M-elements-geosearch-fromlonlat-bybox.yml +36 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-60M-elements-geosearch-fromlonlat-pipeline-10.yml +36 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-60M-elements-geosearch-fromlonlat.yml +36 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-hash-1K-fields-hgetall-pipeline-10.yml +285 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-hash-1K-fields-hgetall.yml +284 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-hash-hscan-1K-fields-100B-values-cursor-count-1000.yml +291 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-hash-hscan-1K-fields-10B-values-cursor-count-100.yml +291 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-hash-hscan-1K-fields-10B-values.yml +290 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-hash-hscan-50-fields-10B-values.yml +54 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-10-elements-lrange-all-elements-pipeline-10.yml +37 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-10-elements-lrange-all-elements.yml +36 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-100-elements-int-7bit-uint-lrange-all-elements-pipeline-10.yml +44 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-100-elements-int-lrange-all-elements-pipeline-10.yml +52 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-100-elements-llen-pipeline-10.yml +52 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-100-elements-lrange-all-elements-pipeline-10.yml +52 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-100-elements-lrange-all-elements.yml +51 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-10K-elements-lindex-integer.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-10K-elements-lindex-string-pipeline-10.yml +42 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-10K-elements-lindex-string.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-10K-elements-linsert-lrem-integer.yml +45 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-10K-elements-linsert-lrem-string.yml +45 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-10K-elements-lpos-integer.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-10K-elements-lpos-string.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-1K-elements-lrange-all-elements-pipeline-10.yml +202 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-1K-elements-lrange-all-elements.yml +201 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-2K-elements-quicklist-lrange-all-elements-longs.yml +258 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-load-hash-1K-fields-with-5B-values.yml +282 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-load-zset-with-5-elements-parsing-float-score.yml +36 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-load-zset-with-5-elements-parsing-hexa-score.yml +36 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-pfadd-4KB-values-pipeline-10.yml +32 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-10-elements-smembers-pipeline-10.yml +37 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-10-elements-smembers.yml +36 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-10-elements-smismember.yml +38 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-100-elements-sismember-is-a-member.yml +53 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-100-elements-sismember-not-a-member.yml +53 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-100-elements-smembers.yml +50 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-100-elements-smismember.yml +54 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-100-elements-sscan.yml +50 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-10M-elements-sismember-50pct-chance.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-10M-elements-srem-50pct-chance.yml +40 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-1K-elements-smembers.yml +200 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-1K-elements-sscan-cursor-count-100.yml +201 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-1K-elements-sscan.yml +200 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-1M-elements-sismember-50pct-chance.yml +40 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-200K-elements-sadd-constant.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-2M-elements-sadd-increasing.yml +32 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zincrby-1M-elements-pipeline-1.yml +40 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zrank-100K-elements-pipeline-1.yml +40 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zrank-10M-elements-pipeline-1.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zrank-1M-elements-pipeline-1.yml +40 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zrem-5M-elements-pipeline-1.yml +47 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zrevrangebyscore-256K-elements-pipeline-1.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zrevrangebyscore-256K-elements-pipeline-10.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zrevrank-1M-elements-pipeline-1.yml +40 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-10-elements-zrange-all-elements-long-scores.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-10-elements-zrange-all-elements.yml +40 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-100-elements-zrange-all-elements.yml +66 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-100-elements-zrangebyscore-all-elements-long-scores.yml +66 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-100-elements-zrangebyscore-all-elements.yml +66 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-100-elements-zscan.yml +65 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-1K-elements-zrange-all-elements.yml +322 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-1K-elements-zscan.yml +321 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-1M-elements-zcard-pipeline-10.yml +39 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-1M-elements-zremrangebyscore-pipeline-10.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-1M-elements-zrevrange-5-elements.yml +40 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-1M-elements-zrevrange-withscores-5-elements-pipeline-10.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-1M-elements-zscore-pipeline-10.yml +40 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-600K-elements-zrangestore-1K-elements.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-600K-elements-zrangestore-300K-elements.yml +43 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-listpack-zrank-100-elements-pipeline-1.yml +50 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-lua-eval-hset-expire.yml +37 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-lua-evalsha-hset-expire.yml +41 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-set-10-100-elements-sdiff.yml +57 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-set-10-100-elements-sinter.yml +57 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-set-10-100-elements-sunion.yml +57 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-stream-5-entries-xread-all-entries-pipeline-10.yml +46 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-stream-5-entries-xread-all-entries.yml +46 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-zset-300-elements-skiplist-encoded-zunion.yml +434 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-zset-300-elements-skiplist-encoded-zunionstore.yml +434 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-3Mkeys-load-string-with-512B-values-pipeline-10.yml +37 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-3Mkeys-load-string-with-512B-values.yml +37 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-3Mkeys-string-get-with-1KiB-values-400_conns.yml +45 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-3Mkeys-string-get-with-1KiB-values-40_conns.yml +45 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-3Mkeys-string-get-with-1KiB-values-pipeline-10-2000_conns.yml +46 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-3Mkeys-string-get-with-1KiB-values-pipeline-10-400_conns.yml +46 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-3Mkeys-string-get-with-1KiB-values-pipeline-10-40_conns.yml +46 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-3Mkeys-string-mixed-20-80-with-512B-values-400_conns.yml +45 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-3Mkeys-string-mixed-20-80-with-512B-values-pipeline-10-2000_conns.yml +46 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-3Mkeys-string-mixed-20-80-with-512B-values-pipeline-10-400_conns.yml +46 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-3Mkeys-string-mixed-20-80-with-512B-values-pipeline-10-5200_conns.yml +46 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-3Mkeys-string-mixed-50-50-with-512B-values-with-expiration-pipeline-10-400_conns.yml +43 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-connection-hello-pipeline-10.yml +32 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-connection-hello.yml +32 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-multiple-hll-pfcount-100B-values.yml +34 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-multiple-hll-pfmerge-100B-values.yml +34 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-nokeys-connection-ping-pipeline-10.yml +29 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-nokeys-pubsub-mixed-100-channels-128B-100-publishers-100-subscribers.yml +40 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-nokeys-pubsub-mixed-100-channels-128B-100-publishers-1000-subscribers.yml +40 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-nokeys-pubsub-mixed-100-channels-128B-100-publishers-5000-subscribers.yml +40 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-nokeys-pubsub-mixed-100-channels-128B-100-publishers-50K-subscribers-5k-conns.yml +40 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-nokeys-pubsub-publish-1K-channels-10B-no-subscribers.yml +30 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-nokeys-server-time-pipeline-10.yml +29 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-playbook-leaderboard-top-10.yml +68 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-playbook-leaderboard-top-100.yml +69 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-playbook-leaderboard-top-1000.yml +68 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-playbook-rate-limiting-lua-100k-sessions.yml +64 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-playbook-realtime-analytics-membership-pipeline-10.yml +56 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-playbook-realtime-analytics-membership.yml +56 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-playbook-session-caching-hash-100k-sessions.yml +108 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-playbook-session-caching-json-100k-sessions.yml +109 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-playbook-session-caching-string-100k-sessions.yml +98 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-playbook-session-storage-100k-sessions.yml +205 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-playbook-session-storage-1k-sessions.yml +205 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-stream-10M-entries-xread-count-100.yml +36 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-stream-10M-entries-xreadgroup-count-100-noack.yml +38 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-stream-10M-entries-xreadgroup-count-100.yml +38 -0
- redis_benchmarks_specification/test-suites/memtier_benchmark-stream-concurrent-xadd-xreadgroup-70-30.yml +50 -0
- redis_benchmarks_specification/test-suites/template.txt +18 -0
- redis_benchmarks_specification/vector-search-test-suites/vector_db_benchmark_test.yml +41 -0
- redis_benchmarks_specification-0.2.42.dist-info/LICENSE +201 -0
- redis_benchmarks_specification-0.2.42.dist-info/METADATA +434 -0
- redis_benchmarks_specification-0.2.42.dist-info/RECORD +336 -0
- redis_benchmarks_specification-0.2.42.dist-info/WHEEL +4 -0
- redis_benchmarks_specification-0.2.42.dist-info/entry_points.txt +10 -0
|
@@ -0,0 +1,1621 @@
|
|
|
1
|
+
# BSD 3-Clause License
|
|
2
|
+
#
|
|
3
|
+
# Copyright (c) 2021., Redis Labs Modules
|
|
4
|
+
# All rights reserved.
|
|
5
|
+
#
|
|
6
|
+
import datetime
|
|
7
|
+
import logging
|
|
8
|
+
from tqdm import tqdm
|
|
9
|
+
import redis
|
|
10
|
+
from jsonpath_ng.parser import JsonPathParser
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def parse(string):
|
|
14
|
+
return JsonPathParser().parse(string)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def parse_exporter_timemetric(metric_path: str, results_dict: dict):
|
|
18
|
+
datapoints_timestamp = None
|
|
19
|
+
try:
|
|
20
|
+
jsonpath_expr = parse(metric_path)
|
|
21
|
+
find_res = jsonpath_expr.find(results_dict)
|
|
22
|
+
if len(find_res) > 0:
|
|
23
|
+
datapoints_timestamp = int(find_res[0].value)
|
|
24
|
+
except Exception as e:
|
|
25
|
+
logging.error(
|
|
26
|
+
"Unable to parse time-metric {}. Error: {}".format(metric_path, e.__str__())
|
|
27
|
+
)
|
|
28
|
+
return datapoints_timestamp
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def parse_exporter_timemetric_definition(
|
|
32
|
+
benchmark_config: dict, configkey: str = "redistimeseries"
|
|
33
|
+
):
|
|
34
|
+
metric_path = None
|
|
35
|
+
if "timemetric" in benchmark_config[configkey]:
|
|
36
|
+
metric_path = benchmark_config[configkey]["timemetric"]
|
|
37
|
+
return metric_path
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def parse_exporter_metrics_definition(
|
|
41
|
+
benchmark_config: dict, configkey: str = "redistimeseries"
|
|
42
|
+
):
|
|
43
|
+
metrics = []
|
|
44
|
+
if configkey in benchmark_config:
|
|
45
|
+
if "metrics" in benchmark_config[configkey]:
|
|
46
|
+
for metric_name in benchmark_config[configkey]["metrics"]:
|
|
47
|
+
metrics.append(metric_name)
|
|
48
|
+
return metrics
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def get_ts_metric_name(
|
|
52
|
+
by,
|
|
53
|
+
by_value,
|
|
54
|
+
tf_github_org,
|
|
55
|
+
tf_github_repo,
|
|
56
|
+
deployment_name,
|
|
57
|
+
deployment_type,
|
|
58
|
+
test_name,
|
|
59
|
+
tf_triggering_env,
|
|
60
|
+
metric_name,
|
|
61
|
+
metric_context_path=None,
|
|
62
|
+
use_metric_context_path=False,
|
|
63
|
+
build_variant_name=None,
|
|
64
|
+
running_platform=None,
|
|
65
|
+
):
|
|
66
|
+
if use_metric_context_path:
|
|
67
|
+
metric_name = "{}/{}".format(metric_name, metric_context_path)
|
|
68
|
+
build_variant_str = ""
|
|
69
|
+
if build_variant_name is not None:
|
|
70
|
+
build_variant_str = "{}/".format(str(build_variant_name))
|
|
71
|
+
running_platform_str = ""
|
|
72
|
+
if running_platform is not None:
|
|
73
|
+
running_platform_str = "{}/".format(str(running_platform))
|
|
74
|
+
if deployment_name != deployment_type:
|
|
75
|
+
deployment_name = "/{}".format(deployment_name)
|
|
76
|
+
else:
|
|
77
|
+
deployment_name = ""
|
|
78
|
+
ts_name = (
|
|
79
|
+
"ci.benchmarks.redis/{by}/"
|
|
80
|
+
"{triggering_env}/{github_org}/{github_repo}/"
|
|
81
|
+
"{test_name}/{build_variant_str}{running_platform_str}{deployment_type}{deployment_name}/{by_value}/{metric}".format(
|
|
82
|
+
by=by,
|
|
83
|
+
triggering_env=tf_triggering_env,
|
|
84
|
+
github_org=tf_github_org,
|
|
85
|
+
github_repo=tf_github_repo,
|
|
86
|
+
test_name=test_name,
|
|
87
|
+
deployment_type=deployment_type,
|
|
88
|
+
deployment_name=deployment_name,
|
|
89
|
+
build_variant_str=build_variant_str,
|
|
90
|
+
running_platform_str=running_platform_str,
|
|
91
|
+
by_value=str(by_value),
|
|
92
|
+
metric=metric_name,
|
|
93
|
+
)
|
|
94
|
+
)
|
|
95
|
+
return ts_name
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def extract_results_table(
|
|
99
|
+
metrics,
|
|
100
|
+
results_dict,
|
|
101
|
+
):
|
|
102
|
+
results_matrix = []
|
|
103
|
+
cleaned_metrics = []
|
|
104
|
+
already_present_metrics = []
|
|
105
|
+
# insert first the dict metrics
|
|
106
|
+
for jsonpath in metrics:
|
|
107
|
+
if type(jsonpath) == dict:
|
|
108
|
+
cleaned_metrics.append(jsonpath)
|
|
109
|
+
metric_jsonpath = list(jsonpath.keys())[0]
|
|
110
|
+
already_present_metrics.append(metric_jsonpath)
|
|
111
|
+
for jsonpath in metrics:
|
|
112
|
+
if type(jsonpath) == str:
|
|
113
|
+
if jsonpath not in already_present_metrics:
|
|
114
|
+
already_present_metrics.append(jsonpath)
|
|
115
|
+
cleaned_metrics.append(jsonpath)
|
|
116
|
+
|
|
117
|
+
for jsonpath in cleaned_metrics:
|
|
118
|
+
test_case_targets_dict = {}
|
|
119
|
+
metric_jsonpath = jsonpath
|
|
120
|
+
find_res = None
|
|
121
|
+
try:
|
|
122
|
+
if type(jsonpath) == str:
|
|
123
|
+
jsonpath_expr = parse(jsonpath)
|
|
124
|
+
if type(jsonpath) == dict:
|
|
125
|
+
metric_jsonpath = list(jsonpath.keys())[0]
|
|
126
|
+
test_case_targets_dict = jsonpath[metric_jsonpath]
|
|
127
|
+
jsonpath_expr = parse(metric_jsonpath)
|
|
128
|
+
find_res = jsonpath_expr.find(results_dict)
|
|
129
|
+
except Exception:
|
|
130
|
+
pass
|
|
131
|
+
finally:
|
|
132
|
+
if find_res is not None:
|
|
133
|
+
use_metric_context_path = False
|
|
134
|
+
if len(find_res) > 1:
|
|
135
|
+
use_metric_context_path = True
|
|
136
|
+
# Always use context path for precision_summary metrics to show actual precision levels
|
|
137
|
+
if "precision_summary" in metric_jsonpath and "*" in metric_jsonpath:
|
|
138
|
+
use_metric_context_path = True
|
|
139
|
+
for metric in find_res:
|
|
140
|
+
metric_name = str(metric.path)
|
|
141
|
+
metric_value = float(metric.value)
|
|
142
|
+
metric_context_path = str(metric.context.path)
|
|
143
|
+
if metric_jsonpath[0] == "$":
|
|
144
|
+
metric_jsonpath = metric_jsonpath[1:]
|
|
145
|
+
if metric_jsonpath[0] == ".":
|
|
146
|
+
metric_jsonpath = metric_jsonpath[1:]
|
|
147
|
+
|
|
148
|
+
# For precision_summary metrics, construct the full resolved path for display
|
|
149
|
+
display_path = metric_jsonpath
|
|
150
|
+
if (
|
|
151
|
+
"precision_summary" in metric_jsonpath
|
|
152
|
+
and "*" in metric_jsonpath
|
|
153
|
+
and use_metric_context_path
|
|
154
|
+
):
|
|
155
|
+
# Replace the wildcard with the actual precision level
|
|
156
|
+
display_path = metric_jsonpath.replace("*", metric_context_path)
|
|
157
|
+
|
|
158
|
+
# retro-compatible naming
|
|
159
|
+
if use_metric_context_path is False:
|
|
160
|
+
metric_name = metric_jsonpath
|
|
161
|
+
else:
|
|
162
|
+
# For display purposes, use the resolved path for precision_summary
|
|
163
|
+
if (
|
|
164
|
+
"precision_summary" in metric_jsonpath
|
|
165
|
+
and "*" in metric_jsonpath
|
|
166
|
+
):
|
|
167
|
+
metric_name = display_path
|
|
168
|
+
else:
|
|
169
|
+
# Clean up the metric name for other cases
|
|
170
|
+
metric_name = metric_name.replace("'", "")
|
|
171
|
+
metric_name = metric_name.replace('"', "")
|
|
172
|
+
metric_name = metric_name.replace("(", "")
|
|
173
|
+
metric_name = metric_name.replace(")", "")
|
|
174
|
+
metric_name = metric_name.replace(" ", "_")
|
|
175
|
+
|
|
176
|
+
# Apply standard cleaning to all metric names
|
|
177
|
+
if not (
|
|
178
|
+
"precision_summary" in metric_jsonpath
|
|
179
|
+
and "*" in metric_jsonpath
|
|
180
|
+
and use_metric_context_path
|
|
181
|
+
):
|
|
182
|
+
metric_name = metric_name.replace("'", "")
|
|
183
|
+
metric_name = metric_name.replace('"', "")
|
|
184
|
+
metric_name = metric_name.replace("(", "")
|
|
185
|
+
metric_name = metric_name.replace(")", "")
|
|
186
|
+
metric_name = metric_name.replace(" ", "_")
|
|
187
|
+
|
|
188
|
+
results_matrix.append(
|
|
189
|
+
[
|
|
190
|
+
metric_jsonpath,
|
|
191
|
+
metric_context_path,
|
|
192
|
+
metric_name,
|
|
193
|
+
metric_value,
|
|
194
|
+
test_case_targets_dict,
|
|
195
|
+
use_metric_context_path,
|
|
196
|
+
]
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
else:
|
|
200
|
+
logging.warning(
|
|
201
|
+
"Unable to find metric path {} in result dict".format(jsonpath)
|
|
202
|
+
)
|
|
203
|
+
return results_matrix
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
def get_ts_tags_and_name(
|
|
207
|
+
break_by_key,
|
|
208
|
+
break_by_str,
|
|
209
|
+
break_by_value,
|
|
210
|
+
build_variant_name,
|
|
211
|
+
deployment_name,
|
|
212
|
+
deployment_type,
|
|
213
|
+
metadata_tags,
|
|
214
|
+
metric_context_path,
|
|
215
|
+
metric_jsonpath,
|
|
216
|
+
metric_name,
|
|
217
|
+
running_platform,
|
|
218
|
+
test_name,
|
|
219
|
+
testcase_metric_context_paths,
|
|
220
|
+
tf_github_org,
|
|
221
|
+
tf_github_repo,
|
|
222
|
+
tf_triggering_env,
|
|
223
|
+
use_metric_context_path,
|
|
224
|
+
):
|
|
225
|
+
# prepare tags
|
|
226
|
+
timeserie_tags = get_project_ts_tags(
|
|
227
|
+
tf_github_org,
|
|
228
|
+
tf_github_repo,
|
|
229
|
+
deployment_name,
|
|
230
|
+
deployment_type,
|
|
231
|
+
tf_triggering_env,
|
|
232
|
+
metadata_tags,
|
|
233
|
+
build_variant_name,
|
|
234
|
+
running_platform,
|
|
235
|
+
)
|
|
236
|
+
timeserie_tags[break_by_key] = break_by_value
|
|
237
|
+
timeserie_tags["{}+{}".format("deployment_name", break_by_key)] = "{} {}".format(
|
|
238
|
+
deployment_name, break_by_value
|
|
239
|
+
)
|
|
240
|
+
timeserie_tags[break_by_key] = break_by_value
|
|
241
|
+
timeserie_tags["{}+{}".format("target", break_by_key)] = "{} {}".format(
|
|
242
|
+
break_by_value, tf_github_repo
|
|
243
|
+
)
|
|
244
|
+
timeserie_tags["test_name"] = str(test_name)
|
|
245
|
+
if build_variant_name is not None:
|
|
246
|
+
timeserie_tags["test_name:build_variant"] = "{}:{}".format(
|
|
247
|
+
test_name, build_variant_name
|
|
248
|
+
)
|
|
249
|
+
timeserie_tags["metric"] = str(metric_name)
|
|
250
|
+
timeserie_tags["metric_name"] = metric_name
|
|
251
|
+
timeserie_tags["metric_context_path"] = metric_context_path
|
|
252
|
+
if metric_context_path is not None:
|
|
253
|
+
timeserie_tags["test_name:metric_context_path"] = "{}:{}".format(
|
|
254
|
+
test_name, metric_context_path
|
|
255
|
+
)
|
|
256
|
+
timeserie_tags["metric_jsonpath"] = metric_jsonpath
|
|
257
|
+
if metric_context_path not in testcase_metric_context_paths:
|
|
258
|
+
testcase_metric_context_paths.append(metric_context_path)
|
|
259
|
+
ts_name = get_ts_metric_name(
|
|
260
|
+
break_by_str,
|
|
261
|
+
break_by_value,
|
|
262
|
+
tf_github_org,
|
|
263
|
+
tf_github_repo,
|
|
264
|
+
deployment_name,
|
|
265
|
+
deployment_type,
|
|
266
|
+
test_name,
|
|
267
|
+
tf_triggering_env,
|
|
268
|
+
metric_name,
|
|
269
|
+
metric_context_path,
|
|
270
|
+
use_metric_context_path,
|
|
271
|
+
build_variant_name,
|
|
272
|
+
running_platform,
|
|
273
|
+
)
|
|
274
|
+
return timeserie_tags, ts_name
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
def from_metric_kv_to_timeserie(
|
|
278
|
+
break_by_key,
|
|
279
|
+
break_by_str,
|
|
280
|
+
break_by_value,
|
|
281
|
+
build_variant_name,
|
|
282
|
+
datapoints_timestamp,
|
|
283
|
+
deployment_name,
|
|
284
|
+
deployment_type,
|
|
285
|
+
metadata_tags,
|
|
286
|
+
metric_context_path,
|
|
287
|
+
metric_jsonpath,
|
|
288
|
+
metric_name,
|
|
289
|
+
metric_value,
|
|
290
|
+
running_platform,
|
|
291
|
+
test_case_targets_dict,
|
|
292
|
+
test_name,
|
|
293
|
+
testcase_metric_context_paths,
|
|
294
|
+
tf_github_org,
|
|
295
|
+
tf_github_repo,
|
|
296
|
+
tf_triggering_env,
|
|
297
|
+
time_series_dict,
|
|
298
|
+
use_metric_context_path,
|
|
299
|
+
):
|
|
300
|
+
timeserie_tags, ts_name = get_ts_tags_and_name(
|
|
301
|
+
break_by_key,
|
|
302
|
+
break_by_str,
|
|
303
|
+
break_by_value,
|
|
304
|
+
build_variant_name,
|
|
305
|
+
deployment_name,
|
|
306
|
+
deployment_type,
|
|
307
|
+
metadata_tags,
|
|
308
|
+
metric_context_path,
|
|
309
|
+
metric_jsonpath,
|
|
310
|
+
metric_name,
|
|
311
|
+
running_platform,
|
|
312
|
+
test_name,
|
|
313
|
+
testcase_metric_context_paths,
|
|
314
|
+
tf_github_org,
|
|
315
|
+
tf_github_repo,
|
|
316
|
+
tf_triggering_env,
|
|
317
|
+
use_metric_context_path,
|
|
318
|
+
)
|
|
319
|
+
logging.info(f"Adding timeserie named {ts_name} to time_series_dict.")
|
|
320
|
+
time_series_dict[ts_name] = {
|
|
321
|
+
"labels": timeserie_tags.copy(),
|
|
322
|
+
"data": {datapoints_timestamp: metric_value},
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
original_ts_name = ts_name
|
|
326
|
+
target_table_keyname = "target_tables:{triggering_env}:ci.benchmarks.redis/{break_by_key}/{break_by_str}/{tf_github_org}/{tf_github_repo}/{deployment_type}/{deployment_name}/{test_name}/{metric_name}".format(
|
|
327
|
+
triggering_env=tf_triggering_env,
|
|
328
|
+
break_by_key=break_by_key,
|
|
329
|
+
break_by_str=break_by_str,
|
|
330
|
+
tf_github_org=tf_github_org,
|
|
331
|
+
tf_github_repo=tf_github_repo,
|
|
332
|
+
deployment_name=deployment_name,
|
|
333
|
+
deployment_type=deployment_type,
|
|
334
|
+
test_name=test_name,
|
|
335
|
+
metric_name=metric_name,
|
|
336
|
+
)
|
|
337
|
+
target_table_dict = {
|
|
338
|
+
"test-case": test_name,
|
|
339
|
+
"metric-name": metric_name,
|
|
340
|
+
tf_github_repo: metric_value,
|
|
341
|
+
"contains-target": False,
|
|
342
|
+
}
|
|
343
|
+
for target_name, target_value in test_case_targets_dict.items():
|
|
344
|
+
target_table_dict["contains-target"] = True
|
|
345
|
+
ts_name = original_ts_name + "/target/{}".format(target_name)
|
|
346
|
+
timeserie_tags_target = timeserie_tags.copy()
|
|
347
|
+
timeserie_tags_target["is_target"] = "true"
|
|
348
|
+
timeserie_tags_target["{}+{}".format("target", break_by_key)] = "{} {}".format(
|
|
349
|
+
break_by_value, target_name
|
|
350
|
+
)
|
|
351
|
+
time_series_dict[ts_name] = {
|
|
352
|
+
"labels": timeserie_tags_target,
|
|
353
|
+
"data": {datapoints_timestamp: target_value},
|
|
354
|
+
}
|
|
355
|
+
if "overallQuantiles" in metric_name:
|
|
356
|
+
comparison_type = "(lower-better)"
|
|
357
|
+
else:
|
|
358
|
+
comparison_type = "(higher-better)"
|
|
359
|
+
if comparison_type == "(higher-better)":
|
|
360
|
+
target_value_pct = (
|
|
361
|
+
(float(metric_value) / float(target_value)) - 1.0
|
|
362
|
+
) * 100.0
|
|
363
|
+
else:
|
|
364
|
+
target_value_pct = (
|
|
365
|
+
(float(target_value) / float(metric_value)) - 1.0
|
|
366
|
+
) * 100.0
|
|
367
|
+
|
|
368
|
+
target_value_pct_str = "{:.2f}".format(target_value_pct)
|
|
369
|
+
|
|
370
|
+
target_table_dict[target_name] = target_value
|
|
371
|
+
|
|
372
|
+
target_table_dict["{}:percent {}".format(target_name, comparison_type)] = (
|
|
373
|
+
target_value_pct_str
|
|
374
|
+
)
|
|
375
|
+
return target_table_keyname, target_table_dict
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
def common_timeseries_extraction(
|
|
379
|
+
break_by_key,
|
|
380
|
+
break_by_str,
|
|
381
|
+
datapoints_timestamp,
|
|
382
|
+
deployment_name,
|
|
383
|
+
deployment_type,
|
|
384
|
+
metrics,
|
|
385
|
+
break_by_value,
|
|
386
|
+
results_dict,
|
|
387
|
+
test_name,
|
|
388
|
+
tf_github_org,
|
|
389
|
+
tf_github_repo,
|
|
390
|
+
tf_triggering_env,
|
|
391
|
+
metadata_tags={},
|
|
392
|
+
build_variant_name=None,
|
|
393
|
+
running_platform=None,
|
|
394
|
+
testcase_metric_context_paths=[],
|
|
395
|
+
):
|
|
396
|
+
time_series_dict = {}
|
|
397
|
+
target_tables = {}
|
|
398
|
+
cleaned_metrics_arr = extract_results_table(metrics, results_dict)
|
|
399
|
+
total_metrics = len(cleaned_metrics_arr)
|
|
400
|
+
logging.info(f"Total of {total_metrics} cleaned metrics: {cleaned_metrics_arr}")
|
|
401
|
+
for cleaned_metric in cleaned_metrics_arr:
|
|
402
|
+
|
|
403
|
+
metric_jsonpath = cleaned_metric[0]
|
|
404
|
+
metric_context_path = cleaned_metric[1]
|
|
405
|
+
metric_name = cleaned_metric[2]
|
|
406
|
+
metric_value = cleaned_metric[3]
|
|
407
|
+
test_case_targets_dict = cleaned_metric[4]
|
|
408
|
+
use_metric_context_path = cleaned_metric[5]
|
|
409
|
+
|
|
410
|
+
target_table_keyname, target_table_dict = from_metric_kv_to_timeserie(
|
|
411
|
+
break_by_key,
|
|
412
|
+
break_by_str,
|
|
413
|
+
break_by_value,
|
|
414
|
+
build_variant_name,
|
|
415
|
+
datapoints_timestamp,
|
|
416
|
+
deployment_name,
|
|
417
|
+
deployment_type,
|
|
418
|
+
metadata_tags,
|
|
419
|
+
metric_context_path,
|
|
420
|
+
metric_jsonpath,
|
|
421
|
+
metric_name,
|
|
422
|
+
metric_value,
|
|
423
|
+
running_platform,
|
|
424
|
+
test_case_targets_dict,
|
|
425
|
+
test_name,
|
|
426
|
+
testcase_metric_context_paths,
|
|
427
|
+
tf_github_org,
|
|
428
|
+
tf_github_repo,
|
|
429
|
+
tf_triggering_env,
|
|
430
|
+
time_series_dict,
|
|
431
|
+
use_metric_context_path,
|
|
432
|
+
)
|
|
433
|
+
target_tables[target_table_keyname] = target_table_dict
|
|
434
|
+
|
|
435
|
+
return time_series_dict, target_tables
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
def extract_perhash_timeseries_from_results(
|
|
439
|
+
datapoints_timestamp: int,
|
|
440
|
+
metrics: list,
|
|
441
|
+
results_dict: dict,
|
|
442
|
+
git_hash: str,
|
|
443
|
+
tf_github_org: str,
|
|
444
|
+
tf_github_repo: str,
|
|
445
|
+
deployment_name: str,
|
|
446
|
+
deployment_type: str,
|
|
447
|
+
test_name: str,
|
|
448
|
+
tf_triggering_env: str,
|
|
449
|
+
metadata_tags={},
|
|
450
|
+
build_variant_name=None,
|
|
451
|
+
running_platform=None,
|
|
452
|
+
testcase_metric_context_paths=[],
|
|
453
|
+
):
|
|
454
|
+
break_by_key = "hash"
|
|
455
|
+
break_by_str = "by.{}".format(break_by_key)
|
|
456
|
+
(
|
|
457
|
+
time_series_dict,
|
|
458
|
+
target_tables,
|
|
459
|
+
) = common_timeseries_extraction(
|
|
460
|
+
break_by_key,
|
|
461
|
+
break_by_str,
|
|
462
|
+
datapoints_timestamp,
|
|
463
|
+
deployment_name,
|
|
464
|
+
deployment_type,
|
|
465
|
+
metrics,
|
|
466
|
+
git_hash,
|
|
467
|
+
results_dict,
|
|
468
|
+
test_name,
|
|
469
|
+
tf_github_org,
|
|
470
|
+
tf_github_repo,
|
|
471
|
+
tf_triggering_env,
|
|
472
|
+
metadata_tags,
|
|
473
|
+
build_variant_name,
|
|
474
|
+
running_platform,
|
|
475
|
+
testcase_metric_context_paths,
|
|
476
|
+
)
|
|
477
|
+
return True, time_series_dict, target_tables
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
def extract_perversion_timeseries_from_results(
|
|
481
|
+
datapoints_timestamp: int,
|
|
482
|
+
metrics: list,
|
|
483
|
+
results_dict: dict,
|
|
484
|
+
project_version: str,
|
|
485
|
+
tf_github_org: str,
|
|
486
|
+
tf_github_repo: str,
|
|
487
|
+
deployment_name: str,
|
|
488
|
+
deployment_type: str,
|
|
489
|
+
test_name: str,
|
|
490
|
+
tf_triggering_env: str,
|
|
491
|
+
metadata_tags={},
|
|
492
|
+
build_variant_name=None,
|
|
493
|
+
running_platform=None,
|
|
494
|
+
testcase_metric_context_paths=[],
|
|
495
|
+
):
|
|
496
|
+
break_by_key = "version"
|
|
497
|
+
break_by_str = "by.{}".format(break_by_key)
|
|
498
|
+
(
|
|
499
|
+
branch_time_series_dict,
|
|
500
|
+
target_tables,
|
|
501
|
+
) = common_timeseries_extraction(
|
|
502
|
+
break_by_key,
|
|
503
|
+
break_by_str,
|
|
504
|
+
datapoints_timestamp,
|
|
505
|
+
deployment_name,
|
|
506
|
+
deployment_type,
|
|
507
|
+
metrics,
|
|
508
|
+
project_version,
|
|
509
|
+
results_dict,
|
|
510
|
+
test_name,
|
|
511
|
+
tf_github_org,
|
|
512
|
+
tf_github_repo,
|
|
513
|
+
tf_triggering_env,
|
|
514
|
+
metadata_tags,
|
|
515
|
+
build_variant_name,
|
|
516
|
+
running_platform,
|
|
517
|
+
testcase_metric_context_paths,
|
|
518
|
+
)
|
|
519
|
+
return True, branch_time_series_dict, target_tables
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
def push_data_to_redistimeseries(rts, time_series_dict: dict, expire_msecs=0):
|
|
523
|
+
datapoint_errors = 0
|
|
524
|
+
datapoint_inserts = 0
|
|
525
|
+
if rts is not None and time_series_dict is not None:
|
|
526
|
+
progress = tqdm(
|
|
527
|
+
unit="benchmark time-series", total=len(time_series_dict.values())
|
|
528
|
+
)
|
|
529
|
+
for timeseries_name, time_series in time_series_dict.items():
|
|
530
|
+
exporter_create_ts(rts, time_series, timeseries_name)
|
|
531
|
+
for orig_timestamp, value in time_series["data"].items():
|
|
532
|
+
if orig_timestamp is None:
|
|
533
|
+
logging.warning("The provided timestamp is null. Using auto-ts")
|
|
534
|
+
timestamp = "*"
|
|
535
|
+
else:
|
|
536
|
+
timestamp = orig_timestamp
|
|
537
|
+
|
|
538
|
+
try_to_insert = True
|
|
539
|
+
retry_count = 0
|
|
540
|
+
while try_to_insert and retry_count < 100:
|
|
541
|
+
# (try to) insert the datapoint in given timestamp
|
|
542
|
+
try_to_insert = False
|
|
543
|
+
|
|
544
|
+
try:
|
|
545
|
+
rts.ts().add(
|
|
546
|
+
timeseries_name,
|
|
547
|
+
timestamp,
|
|
548
|
+
value,
|
|
549
|
+
duplicate_policy="block",
|
|
550
|
+
)
|
|
551
|
+
datapoint_inserts += 1
|
|
552
|
+
except redis.exceptions.DataError:
|
|
553
|
+
logging.warning(
|
|
554
|
+
"Error while inserting datapoint ({} : {}) in timeseries named {}. ".format(
|
|
555
|
+
timestamp, value, timeseries_name
|
|
556
|
+
)
|
|
557
|
+
)
|
|
558
|
+
datapoint_errors += 1
|
|
559
|
+
except redis.exceptions.ResponseError as e:
|
|
560
|
+
if "DUPLICATE_POLICY" in e.__str__():
|
|
561
|
+
# duplicate timestamp: try to insert again, but in the next milisecond
|
|
562
|
+
timestamp += 1
|
|
563
|
+
try_to_insert = True
|
|
564
|
+
retry_count += 1
|
|
565
|
+
else:
|
|
566
|
+
logging.warning(
|
|
567
|
+
"Error while inserting datapoint ({} : {}) in timeseries named {}. ".format(
|
|
568
|
+
timestamp, value, timeseries_name
|
|
569
|
+
)
|
|
570
|
+
)
|
|
571
|
+
datapoint_errors += 1
|
|
572
|
+
if expire_msecs > 0:
|
|
573
|
+
rts.pexpire(timeseries_name, expire_msecs)
|
|
574
|
+
progress.update()
|
|
575
|
+
return datapoint_errors, datapoint_inserts
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
def extract_perbranch_timeseries_from_results(
|
|
579
|
+
datapoints_timestamp: int,
|
|
580
|
+
metrics: list,
|
|
581
|
+
results_dict: dict,
|
|
582
|
+
tf_github_branch: str,
|
|
583
|
+
tf_github_org: str,
|
|
584
|
+
tf_github_repo: str,
|
|
585
|
+
deployment_name: str,
|
|
586
|
+
deployment_type: str,
|
|
587
|
+
test_name: str,
|
|
588
|
+
tf_triggering_env: str,
|
|
589
|
+
metadata_tags={},
|
|
590
|
+
build_variant_name=None,
|
|
591
|
+
running_platform=None,
|
|
592
|
+
testcase_metric_context_paths=[],
|
|
593
|
+
):
|
|
594
|
+
break_by_key = "branch"
|
|
595
|
+
break_by_str = "by.{}".format(break_by_key)
|
|
596
|
+
(branch_time_series_dict, target_tables) = common_timeseries_extraction(
|
|
597
|
+
break_by_key,
|
|
598
|
+
break_by_str,
|
|
599
|
+
datapoints_timestamp,
|
|
600
|
+
deployment_name,
|
|
601
|
+
deployment_type,
|
|
602
|
+
metrics,
|
|
603
|
+
tf_github_branch,
|
|
604
|
+
results_dict,
|
|
605
|
+
test_name,
|
|
606
|
+
tf_github_org,
|
|
607
|
+
tf_github_repo,
|
|
608
|
+
tf_triggering_env,
|
|
609
|
+
metadata_tags,
|
|
610
|
+
build_variant_name,
|
|
611
|
+
running_platform,
|
|
612
|
+
testcase_metric_context_paths,
|
|
613
|
+
)
|
|
614
|
+
return True, branch_time_series_dict, target_tables
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
def check_rts_labels(rts, time_series, timeseries_name):
|
|
618
|
+
updated_create = False
|
|
619
|
+
logging.debug(
|
|
620
|
+
"Timeseries named {} already exists. Checking that the labels match.".format(
|
|
621
|
+
timeseries_name
|
|
622
|
+
)
|
|
623
|
+
)
|
|
624
|
+
set1 = set(time_series["labels"].items())
|
|
625
|
+
set2 = set(rts.ts().info(timeseries_name).labels.items())
|
|
626
|
+
if len(set1 - set2) > 0 or len(set2 - set1) > 0:
|
|
627
|
+
logging.info(
|
|
628
|
+
"Given the labels don't match using TS.ALTER on {} to update labels to {}".format(
|
|
629
|
+
timeseries_name, time_series["labels"]
|
|
630
|
+
)
|
|
631
|
+
)
|
|
632
|
+
updated_create = True
|
|
633
|
+
rts.ts().alter(timeseries_name, labels=time_series["labels"])
|
|
634
|
+
return updated_create
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
def exporter_create_ts(rts, time_series, timeseries_name):
|
|
638
|
+
updated_create = False
|
|
639
|
+
try:
|
|
640
|
+
if rts.exists(timeseries_name):
|
|
641
|
+
updated_create = check_rts_labels(rts, time_series, timeseries_name)
|
|
642
|
+
else:
|
|
643
|
+
logging.debug(
|
|
644
|
+
"Creating timeseries named {} with labels {}".format(
|
|
645
|
+
timeseries_name, time_series["labels"]
|
|
646
|
+
)
|
|
647
|
+
)
|
|
648
|
+
rts.ts().create(
|
|
649
|
+
timeseries_name, labels=time_series["labels"], chunk_size=128
|
|
650
|
+
)
|
|
651
|
+
updated_create = True
|
|
652
|
+
|
|
653
|
+
except redis.exceptions.ResponseError as e:
|
|
654
|
+
if "already exists" in e.__str__():
|
|
655
|
+
updated_create = check_rts_labels(rts, time_series, timeseries_name)
|
|
656
|
+
pass
|
|
657
|
+
else:
|
|
658
|
+
logging.error(
|
|
659
|
+
"While creating timeseries named {} with the following labels: {} this error ocurred: {}".format(
|
|
660
|
+
timeseries_name, time_series["labels"], e.__str__()
|
|
661
|
+
)
|
|
662
|
+
)
|
|
663
|
+
raise
|
|
664
|
+
return updated_create
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
def get_overall_dashboard_keynames(
|
|
668
|
+
tf_github_org,
|
|
669
|
+
tf_github_repo,
|
|
670
|
+
tf_triggering_env,
|
|
671
|
+
build_variant_name=None,
|
|
672
|
+
running_platform=None,
|
|
673
|
+
test_name=None,
|
|
674
|
+
):
|
|
675
|
+
build_variant_str = ""
|
|
676
|
+
if build_variant_name is not None:
|
|
677
|
+
build_variant_str = "/{}".format(build_variant_name)
|
|
678
|
+
running_platform_str = ""
|
|
679
|
+
if running_platform is not None:
|
|
680
|
+
running_platform_str = "/{}".format(running_platform)
|
|
681
|
+
sprefix = (
|
|
682
|
+
"ci.benchmarks.redis/"
|
|
683
|
+
+ "{triggering_env}/{github_org}/{github_repo}".format(
|
|
684
|
+
triggering_env=tf_triggering_env,
|
|
685
|
+
github_org=tf_github_org,
|
|
686
|
+
github_repo=tf_github_repo,
|
|
687
|
+
)
|
|
688
|
+
)
|
|
689
|
+
testcases_setname = "{}:testcases".format(sprefix)
|
|
690
|
+
deployment_name_setname = "{}:deployment_names".format(sprefix)
|
|
691
|
+
project_archs_setname = "{}:archs".format(sprefix)
|
|
692
|
+
project_oss_setname = "{}:oss".format(sprefix)
|
|
693
|
+
project_branches_setname = "{}:branches".format(sprefix)
|
|
694
|
+
project_versions_setname = "{}:versions".format(sprefix)
|
|
695
|
+
project_compilers_setname = "{}:compilers".format(sprefix)
|
|
696
|
+
running_platforms_setname = "{}:platforms".format(sprefix)
|
|
697
|
+
build_variant_setname = "{}:build_variants".format(sprefix)
|
|
698
|
+
build_variant_prefix = "{sprefix}{build_variant_str}".format(
|
|
699
|
+
sprefix=sprefix,
|
|
700
|
+
build_variant_str=build_variant_str,
|
|
701
|
+
)
|
|
702
|
+
prefix = "{build_variant_prefix}{running_platform_str}".format(
|
|
703
|
+
build_variant_prefix=build_variant_prefix,
|
|
704
|
+
running_platform_str=running_platform_str,
|
|
705
|
+
)
|
|
706
|
+
tsname_project_total_success = "{}:total_success".format(
|
|
707
|
+
prefix,
|
|
708
|
+
)
|
|
709
|
+
tsname_project_total_failures = "{}:total_failures".format(
|
|
710
|
+
prefix,
|
|
711
|
+
)
|
|
712
|
+
testcases_metric_context_path_setname = ""
|
|
713
|
+
if test_name is not None:
|
|
714
|
+
testcases_metric_context_path_setname = (
|
|
715
|
+
"{testcases_setname}:metric_context_path:{test_name}".format(
|
|
716
|
+
testcases_setname=testcases_setname, test_name=test_name
|
|
717
|
+
)
|
|
718
|
+
)
|
|
719
|
+
testcases_and_metric_context_path_setname = (
|
|
720
|
+
"{testcases_setname}_AND_metric_context_path".format(
|
|
721
|
+
testcases_setname=testcases_setname
|
|
722
|
+
)
|
|
723
|
+
)
|
|
724
|
+
return (
|
|
725
|
+
prefix,
|
|
726
|
+
testcases_setname,
|
|
727
|
+
deployment_name_setname,
|
|
728
|
+
tsname_project_total_failures,
|
|
729
|
+
tsname_project_total_success,
|
|
730
|
+
running_platforms_setname,
|
|
731
|
+
build_variant_setname,
|
|
732
|
+
testcases_metric_context_path_setname,
|
|
733
|
+
testcases_and_metric_context_path_setname,
|
|
734
|
+
project_archs_setname,
|
|
735
|
+
project_oss_setname,
|
|
736
|
+
project_branches_setname,
|
|
737
|
+
project_versions_setname,
|
|
738
|
+
project_compilers_setname,
|
|
739
|
+
)
|
|
740
|
+
|
|
741
|
+
|
|
742
|
+
def get_project_ts_tags(
|
|
743
|
+
tf_github_org: str,
|
|
744
|
+
tf_github_repo: str,
|
|
745
|
+
deployment_name: str,
|
|
746
|
+
deployment_type: str,
|
|
747
|
+
tf_triggering_env: str,
|
|
748
|
+
metadata_tags={},
|
|
749
|
+
build_variant_name=None,
|
|
750
|
+
running_platform=None,
|
|
751
|
+
):
|
|
752
|
+
tags = {
|
|
753
|
+
"github_org": tf_github_org,
|
|
754
|
+
"github_repo": tf_github_repo,
|
|
755
|
+
"github_org/github_repo": "{}/{}".format(tf_github_org, tf_github_repo),
|
|
756
|
+
"deployment_type": deployment_type,
|
|
757
|
+
"deployment_name": deployment_name,
|
|
758
|
+
"triggering_env": tf_triggering_env,
|
|
759
|
+
}
|
|
760
|
+
if build_variant_name is not None:
|
|
761
|
+
tags["build_variant"] = build_variant_name
|
|
762
|
+
if running_platform is not None:
|
|
763
|
+
tags["running_platform"] = running_platform
|
|
764
|
+
for k, v in metadata_tags.items():
|
|
765
|
+
tags[k] = str(v)
|
|
766
|
+
return tags
|
|
767
|
+
|
|
768
|
+
|
|
769
|
+
def common_exporter_logic(
|
|
770
|
+
deployment_name,
|
|
771
|
+
deployment_type,
|
|
772
|
+
exporter_timemetric_path,
|
|
773
|
+
metrics,
|
|
774
|
+
results_dict,
|
|
775
|
+
test_name,
|
|
776
|
+
tf_github_branch,
|
|
777
|
+
tf_github_org,
|
|
778
|
+
tf_github_repo,
|
|
779
|
+
tf_triggering_env,
|
|
780
|
+
artifact_version="N/A",
|
|
781
|
+
metadata_tags={},
|
|
782
|
+
build_variant_name=None,
|
|
783
|
+
running_platform=None,
|
|
784
|
+
datapoints_timestamp=None,
|
|
785
|
+
git_hash=None,
|
|
786
|
+
):
|
|
787
|
+
per_version_time_series_dict = {}
|
|
788
|
+
per_branch_time_series_dict = {}
|
|
789
|
+
per_hash_time_series_dict = {}
|
|
790
|
+
testcase_metric_context_paths = []
|
|
791
|
+
version_target_tables = None
|
|
792
|
+
branch_target_tables = None
|
|
793
|
+
hash_target_tables = None
|
|
794
|
+
used_ts = datapoints_timestamp
|
|
795
|
+
|
|
796
|
+
if exporter_timemetric_path is not None and used_ts is None:
|
|
797
|
+
# extract timestamp
|
|
798
|
+
used_ts = parse_exporter_timemetric(exporter_timemetric_path, results_dict)
|
|
799
|
+
|
|
800
|
+
if used_ts is None:
|
|
801
|
+
used_ts = int(datetime.datetime.now(datetime.timezone.utc).timestamp() * 1000.0)
|
|
802
|
+
logging.warning(
|
|
803
|
+
"Error while trying to parse datapoints timestamp. Using current system timestamp Error: {}".format(
|
|
804
|
+
used_ts
|
|
805
|
+
)
|
|
806
|
+
)
|
|
807
|
+
assert used_ts is not None
|
|
808
|
+
total_break_by_added = 0
|
|
809
|
+
if (git_hash is not None) and (git_hash != ""):
|
|
810
|
+
# extract per-hash datapoints
|
|
811
|
+
(
|
|
812
|
+
_,
|
|
813
|
+
per_hash_time_series_dict,
|
|
814
|
+
version_target_tables,
|
|
815
|
+
) = extract_perhash_timeseries_from_results(
|
|
816
|
+
used_ts,
|
|
817
|
+
metrics,
|
|
818
|
+
results_dict,
|
|
819
|
+
git_hash,
|
|
820
|
+
tf_github_org,
|
|
821
|
+
tf_github_repo,
|
|
822
|
+
deployment_name,
|
|
823
|
+
deployment_type,
|
|
824
|
+
test_name,
|
|
825
|
+
tf_triggering_env,
|
|
826
|
+
metadata_tags,
|
|
827
|
+
build_variant_name,
|
|
828
|
+
running_platform,
|
|
829
|
+
testcase_metric_context_paths,
|
|
830
|
+
)
|
|
831
|
+
total_break_by_added += 1
|
|
832
|
+
else:
|
|
833
|
+
logging.warning(
|
|
834
|
+
"there was no git hash information to push data brokedown by hash"
|
|
835
|
+
)
|
|
836
|
+
if (
|
|
837
|
+
artifact_version is not None
|
|
838
|
+
and artifact_version != ""
|
|
839
|
+
and artifact_version != "N/A"
|
|
840
|
+
):
|
|
841
|
+
# Check if version 255.255.255 should only be pushed for unstable branch
|
|
842
|
+
should_push_version = True
|
|
843
|
+
if artifact_version == "255.255.255":
|
|
844
|
+
if tf_github_branch != "unstable":
|
|
845
|
+
logging.info(
|
|
846
|
+
f"Skipping version 255.255.255 data push for branch '{tf_github_branch}' "
|
|
847
|
+
f"(only pushing for 'unstable' branch)"
|
|
848
|
+
)
|
|
849
|
+
should_push_version = False
|
|
850
|
+
else:
|
|
851
|
+
logging.info(f"Pushing version 255.255.255 data for unstable branch")
|
|
852
|
+
|
|
853
|
+
if should_push_version:
|
|
854
|
+
# extract per-version datapoints
|
|
855
|
+
total_hs_ts = len(per_hash_time_series_dict.keys())
|
|
856
|
+
logging.info(
|
|
857
|
+
f"Extending the by.hash {git_hash} timeseries ({total_hs_ts}) with version info {artifact_version}"
|
|
858
|
+
)
|
|
859
|
+
for hash_timeserie in per_hash_time_series_dict.values():
|
|
860
|
+
hash_timeserie["labels"]["version"] = artifact_version
|
|
861
|
+
(
|
|
862
|
+
_,
|
|
863
|
+
per_version_time_series_dict,
|
|
864
|
+
version_target_tables,
|
|
865
|
+
) = extract_perversion_timeseries_from_results(
|
|
866
|
+
used_ts,
|
|
867
|
+
metrics,
|
|
868
|
+
results_dict,
|
|
869
|
+
artifact_version,
|
|
870
|
+
tf_github_org,
|
|
871
|
+
tf_github_repo,
|
|
872
|
+
deployment_name,
|
|
873
|
+
deployment_type,
|
|
874
|
+
test_name,
|
|
875
|
+
tf_triggering_env,
|
|
876
|
+
metadata_tags,
|
|
877
|
+
build_variant_name,
|
|
878
|
+
running_platform,
|
|
879
|
+
testcase_metric_context_paths,
|
|
880
|
+
)
|
|
881
|
+
total_break_by_added += 1
|
|
882
|
+
else:
|
|
883
|
+
logging.warning(
|
|
884
|
+
"there was no git VERSION information to push data brokedown by VERSION"
|
|
885
|
+
)
|
|
886
|
+
if tf_github_branch is not None and tf_github_branch != "":
|
|
887
|
+
total_hs_ts = len(per_hash_time_series_dict.keys())
|
|
888
|
+
logging.info(
|
|
889
|
+
f"Extending the by.hash {git_hash} timeseries ({total_hs_ts}) with branch info {tf_github_branch}"
|
|
890
|
+
)
|
|
891
|
+
for hash_timeserie in per_hash_time_series_dict.values():
|
|
892
|
+
hash_timeserie["labels"]["branch"] = tf_github_branch
|
|
893
|
+
# extract per branch datapoints
|
|
894
|
+
(
|
|
895
|
+
_,
|
|
896
|
+
per_branch_time_series_dict,
|
|
897
|
+
branch_target_tables,
|
|
898
|
+
) = extract_perbranch_timeseries_from_results(
|
|
899
|
+
used_ts,
|
|
900
|
+
metrics,
|
|
901
|
+
results_dict,
|
|
902
|
+
str(tf_github_branch),
|
|
903
|
+
tf_github_org,
|
|
904
|
+
tf_github_repo,
|
|
905
|
+
deployment_name,
|
|
906
|
+
deployment_type,
|
|
907
|
+
test_name,
|
|
908
|
+
tf_triggering_env,
|
|
909
|
+
metadata_tags,
|
|
910
|
+
build_variant_name,
|
|
911
|
+
running_platform,
|
|
912
|
+
testcase_metric_context_paths,
|
|
913
|
+
)
|
|
914
|
+
total_break_by_added += 1
|
|
915
|
+
else:
|
|
916
|
+
logging.warning(
|
|
917
|
+
"there was no git BRANCH information to push data brokedown by BRANCH"
|
|
918
|
+
)
|
|
919
|
+
if total_break_by_added == 0:
|
|
920
|
+
logging.error(
|
|
921
|
+
"There was no BRANCH, HASH, or VERSION info to break this info by in timeseries"
|
|
922
|
+
)
|
|
923
|
+
return (
|
|
924
|
+
per_version_time_series_dict,
|
|
925
|
+
per_branch_time_series_dict,
|
|
926
|
+
per_hash_time_series_dict,
|
|
927
|
+
testcase_metric_context_paths,
|
|
928
|
+
version_target_tables,
|
|
929
|
+
branch_target_tables,
|
|
930
|
+
hash_target_tables,
|
|
931
|
+
)
|
|
932
|
+
|
|
933
|
+
|
|
934
|
+
def merge_default_and_config_metrics(
|
|
935
|
+
benchmark_config, default_metrics, exporter_timemetric_path
|
|
936
|
+
):
|
|
937
|
+
if default_metrics is None:
|
|
938
|
+
default_metrics = []
|
|
939
|
+
metrics = default_metrics
|
|
940
|
+
if benchmark_config is not None:
|
|
941
|
+
if "exporter" in benchmark_config:
|
|
942
|
+
extra_metrics = parse_exporter_metrics_definition(
|
|
943
|
+
benchmark_config["exporter"]
|
|
944
|
+
)
|
|
945
|
+
metrics.extend(extra_metrics)
|
|
946
|
+
extra_timemetric_path = parse_exporter_timemetric_definition(
|
|
947
|
+
benchmark_config["exporter"]
|
|
948
|
+
)
|
|
949
|
+
if extra_timemetric_path is not None:
|
|
950
|
+
exporter_timemetric_path = extra_timemetric_path
|
|
951
|
+
return exporter_timemetric_path, metrics
|
|
952
|
+
|
|
953
|
+
|
|
954
|
+
def get_profilers_rts_key_prefix(triggering_env, tf_github_org, tf_github_repo):
|
|
955
|
+
zset_name = "ci.benchmarks.redis.com/{triggering_env}/{github_org}/{github_repo}:profiles".format(
|
|
956
|
+
triggering_env=triggering_env,
|
|
957
|
+
github_org=tf_github_org,
|
|
958
|
+
github_repo=tf_github_repo,
|
|
959
|
+
)
|
|
960
|
+
return zset_name
|
|
961
|
+
|
|
962
|
+
|
|
963
|
+
def prepare_timeseries_dict(
|
|
964
|
+
artifact_version,
|
|
965
|
+
benchmark_config,
|
|
966
|
+
default_metrics,
|
|
967
|
+
deployment_name,
|
|
968
|
+
deployment_type,
|
|
969
|
+
exporter_timemetric_path,
|
|
970
|
+
results_dict,
|
|
971
|
+
test_name,
|
|
972
|
+
tf_github_branch,
|
|
973
|
+
tf_github_org,
|
|
974
|
+
tf_github_repo,
|
|
975
|
+
tf_triggering_env,
|
|
976
|
+
metadata_tags={},
|
|
977
|
+
build_variant_name=None,
|
|
978
|
+
running_platform=None,
|
|
979
|
+
datapoints_timestamp=None,
|
|
980
|
+
git_hash=None,
|
|
981
|
+
):
|
|
982
|
+
time_series_dict = {}
|
|
983
|
+
# check which metrics to extract
|
|
984
|
+
exporter_timemetric_path, metrics = merge_default_and_config_metrics(
|
|
985
|
+
benchmark_config, default_metrics, exporter_timemetric_path
|
|
986
|
+
)
|
|
987
|
+
(
|
|
988
|
+
per_version_time_series_dict,
|
|
989
|
+
per_branch_time_series_dict,
|
|
990
|
+
per_hash_timeseries_dict,
|
|
991
|
+
testcase_metric_context_paths,
|
|
992
|
+
version_target_tables,
|
|
993
|
+
branch_target_tables,
|
|
994
|
+
_,
|
|
995
|
+
) = common_exporter_logic(
|
|
996
|
+
deployment_name,
|
|
997
|
+
deployment_type,
|
|
998
|
+
exporter_timemetric_path,
|
|
999
|
+
metrics,
|
|
1000
|
+
results_dict,
|
|
1001
|
+
test_name,
|
|
1002
|
+
tf_github_branch,
|
|
1003
|
+
tf_github_org,
|
|
1004
|
+
tf_github_repo,
|
|
1005
|
+
tf_triggering_env,
|
|
1006
|
+
artifact_version,
|
|
1007
|
+
metadata_tags,
|
|
1008
|
+
build_variant_name,
|
|
1009
|
+
running_platform,
|
|
1010
|
+
datapoints_timestamp,
|
|
1011
|
+
git_hash,
|
|
1012
|
+
)
|
|
1013
|
+
time_series_dict.update(per_version_time_series_dict)
|
|
1014
|
+
time_series_dict.update(per_branch_time_series_dict)
|
|
1015
|
+
time_series_dict.update(per_hash_timeseries_dict)
|
|
1016
|
+
return (
|
|
1017
|
+
time_series_dict,
|
|
1018
|
+
testcase_metric_context_paths,
|
|
1019
|
+
version_target_tables,
|
|
1020
|
+
branch_target_tables,
|
|
1021
|
+
)
|
|
1022
|
+
|
|
1023
|
+
|
|
1024
|
+
def add_standardized_metric_bybranch(
|
|
1025
|
+
metric_name,
|
|
1026
|
+
metric_value,
|
|
1027
|
+
tf_github_branch,
|
|
1028
|
+
deployment_name,
|
|
1029
|
+
deployment_type,
|
|
1030
|
+
rts,
|
|
1031
|
+
start_time_ms,
|
|
1032
|
+
test_name,
|
|
1033
|
+
tf_github_org,
|
|
1034
|
+
tf_github_repo,
|
|
1035
|
+
tf_triggering_env,
|
|
1036
|
+
metadata_tags={},
|
|
1037
|
+
build_variant_name=None,
|
|
1038
|
+
running_platform=None,
|
|
1039
|
+
):
|
|
1040
|
+
if metric_value is not None:
|
|
1041
|
+
tsname_use_case_duration = get_ts_metric_name(
|
|
1042
|
+
"by.branch",
|
|
1043
|
+
tf_github_branch,
|
|
1044
|
+
tf_github_org,
|
|
1045
|
+
tf_github_repo,
|
|
1046
|
+
deployment_name,
|
|
1047
|
+
deployment_type,
|
|
1048
|
+
test_name,
|
|
1049
|
+
tf_triggering_env,
|
|
1050
|
+
metric_name,
|
|
1051
|
+
None,
|
|
1052
|
+
False,
|
|
1053
|
+
build_variant_name,
|
|
1054
|
+
running_platform,
|
|
1055
|
+
)
|
|
1056
|
+
labels = get_project_ts_tags(
|
|
1057
|
+
tf_github_org,
|
|
1058
|
+
tf_github_repo,
|
|
1059
|
+
deployment_name,
|
|
1060
|
+
deployment_type,
|
|
1061
|
+
tf_triggering_env,
|
|
1062
|
+
metadata_tags,
|
|
1063
|
+
build_variant_name,
|
|
1064
|
+
running_platform,
|
|
1065
|
+
)
|
|
1066
|
+
labels["branch"] = tf_github_branch
|
|
1067
|
+
labels["deployment_name+branch"] = "{} {}".format(
|
|
1068
|
+
deployment_name, tf_github_branch
|
|
1069
|
+
)
|
|
1070
|
+
labels["running_platform+branch"] = "{} {}".format(
|
|
1071
|
+
running_platform, tf_github_branch
|
|
1072
|
+
)
|
|
1073
|
+
labels["test_name"] = str(test_name)
|
|
1074
|
+
labels["metric"] = str(metric_name)
|
|
1075
|
+
logging.info(
|
|
1076
|
+
"Adding metric {}={} to time-serie named {}".format(
|
|
1077
|
+
metric_name, metric_value, tsname_use_case_duration
|
|
1078
|
+
)
|
|
1079
|
+
)
|
|
1080
|
+
ts = {"labels": labels}
|
|
1081
|
+
exporter_create_ts(rts, ts, tsname_use_case_duration)
|
|
1082
|
+
logging.error(labels)
|
|
1083
|
+
rts.ts().add(
|
|
1084
|
+
tsname_use_case_duration,
|
|
1085
|
+
start_time_ms,
|
|
1086
|
+
metric_value,
|
|
1087
|
+
labels=labels,
|
|
1088
|
+
)
|
|
1089
|
+
else:
|
|
1090
|
+
logging.warning(
|
|
1091
|
+
"Given that metric {}={} ( is None ) we will skip adding it to timeseries".format(
|
|
1092
|
+
metric_name, metric_value
|
|
1093
|
+
)
|
|
1094
|
+
)
|
|
1095
|
+
|
|
1096
|
+
|
|
1097
|
+
def add_standardized_metric_byversion(
|
|
1098
|
+
metric_name,
|
|
1099
|
+
metric_value,
|
|
1100
|
+
artifact_version,
|
|
1101
|
+
deployment_name,
|
|
1102
|
+
deployment_type,
|
|
1103
|
+
rts,
|
|
1104
|
+
start_time_ms,
|
|
1105
|
+
test_name,
|
|
1106
|
+
tf_github_org,
|
|
1107
|
+
tf_github_repo,
|
|
1108
|
+
tf_triggering_env,
|
|
1109
|
+
metadata_tags={},
|
|
1110
|
+
build_variant_name=None,
|
|
1111
|
+
running_platform=None,
|
|
1112
|
+
):
|
|
1113
|
+
if metric_value is not None:
|
|
1114
|
+
tsname_use_case_duration = get_ts_metric_name(
|
|
1115
|
+
"by.version",
|
|
1116
|
+
artifact_version,
|
|
1117
|
+
tf_github_org,
|
|
1118
|
+
tf_github_repo,
|
|
1119
|
+
deployment_name,
|
|
1120
|
+
deployment_type,
|
|
1121
|
+
test_name,
|
|
1122
|
+
tf_triggering_env,
|
|
1123
|
+
metric_name,
|
|
1124
|
+
None,
|
|
1125
|
+
False,
|
|
1126
|
+
build_variant_name,
|
|
1127
|
+
running_platform,
|
|
1128
|
+
)
|
|
1129
|
+
labels = get_project_ts_tags(
|
|
1130
|
+
tf_github_org,
|
|
1131
|
+
tf_github_repo,
|
|
1132
|
+
deployment_name,
|
|
1133
|
+
deployment_type,
|
|
1134
|
+
tf_triggering_env,
|
|
1135
|
+
metadata_tags,
|
|
1136
|
+
build_variant_name,
|
|
1137
|
+
running_platform,
|
|
1138
|
+
)
|
|
1139
|
+
labels["version"] = artifact_version
|
|
1140
|
+
labels["deployment_name+version"] = "{} {}".format(
|
|
1141
|
+
deployment_name, artifact_version
|
|
1142
|
+
)
|
|
1143
|
+
labels["running_platform+version"] = "{} {}".format(
|
|
1144
|
+
running_platform, artifact_version
|
|
1145
|
+
)
|
|
1146
|
+
labels["test_name"] = str(test_name)
|
|
1147
|
+
labels["metric"] = str(metric_name)
|
|
1148
|
+
logging.info(
|
|
1149
|
+
"Adding metric {}={} to time-serie named {}".format(
|
|
1150
|
+
metric_name, metric_value, tsname_use_case_duration
|
|
1151
|
+
)
|
|
1152
|
+
)
|
|
1153
|
+
ts = {"labels": labels}
|
|
1154
|
+
exporter_create_ts(rts, ts, tsname_use_case_duration)
|
|
1155
|
+
rts.ts().add(
|
|
1156
|
+
tsname_use_case_duration,
|
|
1157
|
+
start_time_ms,
|
|
1158
|
+
metric_value,
|
|
1159
|
+
labels=labels,
|
|
1160
|
+
)
|
|
1161
|
+
else:
|
|
1162
|
+
logging.warning(
|
|
1163
|
+
"Given that metric {}={} ( is None ) we will skip adding it to timeseries".format(
|
|
1164
|
+
metric_name, metric_value
|
|
1165
|
+
)
|
|
1166
|
+
)
|
|
1167
|
+
|
|
1168
|
+
|
|
1169
|
+
def timeseries_test_sucess_flow(
|
|
1170
|
+
push_results_redistimeseries,
|
|
1171
|
+
artifact_version,
|
|
1172
|
+
benchmark_config,
|
|
1173
|
+
benchmark_duration_seconds,
|
|
1174
|
+
dataset_load_duration_seconds,
|
|
1175
|
+
default_metrics,
|
|
1176
|
+
deployment_name,
|
|
1177
|
+
deployment_type,
|
|
1178
|
+
exporter_timemetric_path,
|
|
1179
|
+
results_dict,
|
|
1180
|
+
rts,
|
|
1181
|
+
start_time_ms,
|
|
1182
|
+
test_name,
|
|
1183
|
+
tf_github_branch,
|
|
1184
|
+
tf_github_org,
|
|
1185
|
+
tf_github_repo,
|
|
1186
|
+
tf_triggering_env,
|
|
1187
|
+
metadata_tags={},
|
|
1188
|
+
build_variant_name=None,
|
|
1189
|
+
running_platform=None,
|
|
1190
|
+
timeseries_dict=None,
|
|
1191
|
+
git_hash=None,
|
|
1192
|
+
disable_target_tables=False,
|
|
1193
|
+
):
|
|
1194
|
+
testcase_metric_context_paths = []
|
|
1195
|
+
version_target_tables = None
|
|
1196
|
+
branch_target_tables = None
|
|
1197
|
+
if timeseries_dict is None:
|
|
1198
|
+
(
|
|
1199
|
+
timeseries_dict,
|
|
1200
|
+
testcase_metric_context_paths,
|
|
1201
|
+
version_target_tables,
|
|
1202
|
+
branch_target_tables,
|
|
1203
|
+
) = prepare_timeseries_dict(
|
|
1204
|
+
artifact_version,
|
|
1205
|
+
benchmark_config,
|
|
1206
|
+
default_metrics,
|
|
1207
|
+
deployment_name,
|
|
1208
|
+
deployment_type,
|
|
1209
|
+
exporter_timemetric_path,
|
|
1210
|
+
results_dict,
|
|
1211
|
+
test_name,
|
|
1212
|
+
tf_github_branch,
|
|
1213
|
+
tf_github_org,
|
|
1214
|
+
tf_github_repo,
|
|
1215
|
+
tf_triggering_env,
|
|
1216
|
+
metadata_tags,
|
|
1217
|
+
build_variant_name,
|
|
1218
|
+
running_platform,
|
|
1219
|
+
start_time_ms,
|
|
1220
|
+
git_hash,
|
|
1221
|
+
)
|
|
1222
|
+
if push_results_redistimeseries:
|
|
1223
|
+
logging.info(
|
|
1224
|
+
"Pushing results to RedisTimeSeries. Have {} distinct data-points to insert.".format(
|
|
1225
|
+
len(timeseries_dict.keys())
|
|
1226
|
+
)
|
|
1227
|
+
)
|
|
1228
|
+
push_data_to_redistimeseries(rts, timeseries_dict)
|
|
1229
|
+
if not disable_target_tables and version_target_tables is not None:
|
|
1230
|
+
logging.info(
|
|
1231
|
+
"There are a total of {} distinct target tables by version".format(
|
|
1232
|
+
len(version_target_tables.keys())
|
|
1233
|
+
)
|
|
1234
|
+
)
|
|
1235
|
+
for (
|
|
1236
|
+
version_target_table_keyname,
|
|
1237
|
+
version_target_table_dict,
|
|
1238
|
+
) in version_target_tables.items():
|
|
1239
|
+
logging.info(
|
|
1240
|
+
"Setting target table by version on key {}".format(
|
|
1241
|
+
version_target_table_keyname
|
|
1242
|
+
)
|
|
1243
|
+
)
|
|
1244
|
+
if "contains-target" in version_target_table_dict:
|
|
1245
|
+
del version_target_table_dict["contains-target"]
|
|
1246
|
+
rts.hset(
|
|
1247
|
+
version_target_table_keyname, None, None, version_target_table_dict
|
|
1248
|
+
)
|
|
1249
|
+
elif disable_target_tables:
|
|
1250
|
+
logging.info(
|
|
1251
|
+
"Target tables disabled - skipping version target table creation"
|
|
1252
|
+
)
|
|
1253
|
+
|
|
1254
|
+
if not disable_target_tables and branch_target_tables is not None:
|
|
1255
|
+
logging.info(
|
|
1256
|
+
"There are a total of {} distinct target tables by branch".format(
|
|
1257
|
+
len(branch_target_tables.keys())
|
|
1258
|
+
)
|
|
1259
|
+
)
|
|
1260
|
+
for (
|
|
1261
|
+
branch_target_table_keyname,
|
|
1262
|
+
branch_target_table_dict,
|
|
1263
|
+
) in branch_target_tables.items():
|
|
1264
|
+
|
|
1265
|
+
logging.info(
|
|
1266
|
+
"Setting target table by branch on key {}".format(
|
|
1267
|
+
branch_target_table_keyname
|
|
1268
|
+
)
|
|
1269
|
+
)
|
|
1270
|
+
if "contains-target" in branch_target_table_dict:
|
|
1271
|
+
del branch_target_table_dict["contains-target"]
|
|
1272
|
+
rts.hset(
|
|
1273
|
+
branch_target_table_keyname, None, None, branch_target_table_dict
|
|
1274
|
+
)
|
|
1275
|
+
elif disable_target_tables:
|
|
1276
|
+
logging.info(
|
|
1277
|
+
"Target tables disabled - skipping branch target table creation"
|
|
1278
|
+
)
|
|
1279
|
+
if test_name is not None:
|
|
1280
|
+
if type(test_name) is str:
|
|
1281
|
+
update_secondary_result_keys(
|
|
1282
|
+
artifact_version,
|
|
1283
|
+
benchmark_duration_seconds,
|
|
1284
|
+
build_variant_name,
|
|
1285
|
+
dataset_load_duration_seconds,
|
|
1286
|
+
deployment_name,
|
|
1287
|
+
deployment_type,
|
|
1288
|
+
metadata_tags,
|
|
1289
|
+
rts,
|
|
1290
|
+
running_platform,
|
|
1291
|
+
start_time_ms,
|
|
1292
|
+
test_name,
|
|
1293
|
+
testcase_metric_context_paths,
|
|
1294
|
+
tf_github_branch,
|
|
1295
|
+
tf_github_org,
|
|
1296
|
+
tf_github_repo,
|
|
1297
|
+
tf_triggering_env,
|
|
1298
|
+
)
|
|
1299
|
+
if type(test_name) is list:
|
|
1300
|
+
for inner_test_name in test_name:
|
|
1301
|
+
update_secondary_result_keys(
|
|
1302
|
+
artifact_version,
|
|
1303
|
+
benchmark_duration_seconds,
|
|
1304
|
+
build_variant_name,
|
|
1305
|
+
dataset_load_duration_seconds,
|
|
1306
|
+
deployment_name,
|
|
1307
|
+
deployment_type,
|
|
1308
|
+
metadata_tags,
|
|
1309
|
+
rts,
|
|
1310
|
+
running_platform,
|
|
1311
|
+
start_time_ms,
|
|
1312
|
+
inner_test_name,
|
|
1313
|
+
testcase_metric_context_paths,
|
|
1314
|
+
tf_github_branch,
|
|
1315
|
+
tf_github_org,
|
|
1316
|
+
tf_github_repo,
|
|
1317
|
+
tf_triggering_env,
|
|
1318
|
+
)
|
|
1319
|
+
else:
|
|
1320
|
+
update_secondary_result_keys(
|
|
1321
|
+
artifact_version,
|
|
1322
|
+
benchmark_duration_seconds,
|
|
1323
|
+
build_variant_name,
|
|
1324
|
+
dataset_load_duration_seconds,
|
|
1325
|
+
deployment_name,
|
|
1326
|
+
deployment_type,
|
|
1327
|
+
metadata_tags,
|
|
1328
|
+
rts,
|
|
1329
|
+
running_platform,
|
|
1330
|
+
start_time_ms,
|
|
1331
|
+
test_name,
|
|
1332
|
+
testcase_metric_context_paths,
|
|
1333
|
+
tf_github_branch,
|
|
1334
|
+
tf_github_org,
|
|
1335
|
+
tf_github_repo,
|
|
1336
|
+
tf_triggering_env,
|
|
1337
|
+
)
|
|
1338
|
+
return version_target_tables, branch_target_tables
|
|
1339
|
+
|
|
1340
|
+
|
|
1341
|
+
def update_secondary_result_keys(
|
|
1342
|
+
artifact_version,
|
|
1343
|
+
benchmark_duration_seconds,
|
|
1344
|
+
build_variant_name,
|
|
1345
|
+
dataset_load_duration_seconds,
|
|
1346
|
+
deployment_name,
|
|
1347
|
+
deployment_type,
|
|
1348
|
+
metadata_tags,
|
|
1349
|
+
rts,
|
|
1350
|
+
running_platform,
|
|
1351
|
+
start_time_ms,
|
|
1352
|
+
test_name,
|
|
1353
|
+
testcase_metric_context_paths,
|
|
1354
|
+
tf_github_branch,
|
|
1355
|
+
tf_github_org,
|
|
1356
|
+
tf_github_repo,
|
|
1357
|
+
tf_triggering_env,
|
|
1358
|
+
):
|
|
1359
|
+
(
|
|
1360
|
+
_,
|
|
1361
|
+
testcases_setname,
|
|
1362
|
+
deployment_name_zsetname,
|
|
1363
|
+
_,
|
|
1364
|
+
tsname_project_total_success,
|
|
1365
|
+
running_platforms_setname,
|
|
1366
|
+
build_variant_setname,
|
|
1367
|
+
testcases_metric_context_path_setname,
|
|
1368
|
+
testcases_and_metric_context_path_setname,
|
|
1369
|
+
project_archs_setname,
|
|
1370
|
+
project_oss_setname,
|
|
1371
|
+
project_branches_setname,
|
|
1372
|
+
project_versions_setname,
|
|
1373
|
+
project_compilers_setname,
|
|
1374
|
+
) = get_overall_dashboard_keynames(
|
|
1375
|
+
tf_github_org,
|
|
1376
|
+
tf_github_repo,
|
|
1377
|
+
tf_triggering_env,
|
|
1378
|
+
build_variant_name,
|
|
1379
|
+
running_platform,
|
|
1380
|
+
test_name,
|
|
1381
|
+
)
|
|
1382
|
+
try:
|
|
1383
|
+
rts.zadd(deployment_name_zsetname, {deployment_name: start_time_ms})
|
|
1384
|
+
if test_name is not None:
|
|
1385
|
+
deployment_name_zsetname_testnames = (
|
|
1386
|
+
deployment_name_zsetname
|
|
1387
|
+
+ "{}:deployment_name={}".format(
|
|
1388
|
+
deployment_name_zsetname, deployment_name
|
|
1389
|
+
)
|
|
1390
|
+
)
|
|
1391
|
+
rts.zadd(deployment_name_zsetname_testnames, {test_name: start_time_ms})
|
|
1392
|
+
rts.sadd(testcases_setname, test_name)
|
|
1393
|
+
testcases_zsetname = testcases_setname + ":zset"
|
|
1394
|
+
rts.zadd(testcases_zsetname, {test_name: start_time_ms})
|
|
1395
|
+
if "component" in metadata_tags:
|
|
1396
|
+
testcases_zsetname_component = "{}:zset:component:{}".format(
|
|
1397
|
+
testcases_setname, metadata_tags["component"]
|
|
1398
|
+
)
|
|
1399
|
+
rts.zadd(testcases_zsetname_component, {test_name: start_time_ms})
|
|
1400
|
+
if "arch" in metadata_tags:
|
|
1401
|
+
rts.sadd(project_archs_setname, metadata_tags["arch"])
|
|
1402
|
+
if "os" in metadata_tags:
|
|
1403
|
+
rts.sadd(project_oss_setname, metadata_tags["os"])
|
|
1404
|
+
if "compiler" in metadata_tags:
|
|
1405
|
+
rts.sadd(project_compilers_setname, metadata_tags["compiler"])
|
|
1406
|
+
if tf_github_branch is not None and tf_github_branch != "":
|
|
1407
|
+
rts.sadd(project_branches_setname, tf_github_branch)
|
|
1408
|
+
project_branches_zsetname = project_branches_setname + ":zset"
|
|
1409
|
+
rts.zadd(project_branches_zsetname, {tf_github_branch: start_time_ms})
|
|
1410
|
+
if artifact_version is not None and artifact_version != "":
|
|
1411
|
+
rts.sadd(project_versions_setname, artifact_version)
|
|
1412
|
+
project_versions_zsetname = project_versions_setname + ":zset"
|
|
1413
|
+
rts.zadd(project_versions_zsetname, {artifact_version: start_time_ms})
|
|
1414
|
+
if running_platform is not None:
|
|
1415
|
+
rts.sadd(running_platforms_setname, running_platform)
|
|
1416
|
+
running_platforms_szetname = running_platforms_setname + ":zset"
|
|
1417
|
+
rts.zadd(running_platforms_szetname, {running_platform: start_time_ms})
|
|
1418
|
+
if build_variant_name is not None:
|
|
1419
|
+
rts.sadd(build_variant_setname, build_variant_name)
|
|
1420
|
+
build_variant_zsetname = build_variant_setname + ":zset"
|
|
1421
|
+
rts.zadd(build_variant_zsetname, {build_variant_name: start_time_ms})
|
|
1422
|
+
if testcase_metric_context_paths is not None:
|
|
1423
|
+
for metric_context_path in testcase_metric_context_paths:
|
|
1424
|
+
if testcases_metric_context_path_setname != "":
|
|
1425
|
+
rts.sadd(testcases_metric_context_path_setname, metric_context_path)
|
|
1426
|
+
rts.sadd(
|
|
1427
|
+
testcases_and_metric_context_path_setname,
|
|
1428
|
+
"{}:{}".format(test_name, metric_context_path),
|
|
1429
|
+
)
|
|
1430
|
+
rts.ts().incrby(
|
|
1431
|
+
tsname_project_total_success,
|
|
1432
|
+
1,
|
|
1433
|
+
timestamp=start_time_ms,
|
|
1434
|
+
labels=get_project_ts_tags(
|
|
1435
|
+
tf_github_org,
|
|
1436
|
+
tf_github_repo,
|
|
1437
|
+
deployment_name,
|
|
1438
|
+
deployment_type,
|
|
1439
|
+
tf_triggering_env,
|
|
1440
|
+
metadata_tags,
|
|
1441
|
+
build_variant_name,
|
|
1442
|
+
running_platform,
|
|
1443
|
+
),
|
|
1444
|
+
)
|
|
1445
|
+
if tf_github_branch is not None and tf_github_branch != "":
|
|
1446
|
+
add_standardized_metric_bybranch(
|
|
1447
|
+
"benchmark_duration",
|
|
1448
|
+
benchmark_duration_seconds,
|
|
1449
|
+
str(tf_github_branch),
|
|
1450
|
+
deployment_name,
|
|
1451
|
+
deployment_type,
|
|
1452
|
+
rts,
|
|
1453
|
+
start_time_ms,
|
|
1454
|
+
test_name,
|
|
1455
|
+
tf_github_org,
|
|
1456
|
+
tf_github_repo,
|
|
1457
|
+
tf_triggering_env,
|
|
1458
|
+
metadata_tags,
|
|
1459
|
+
build_variant_name,
|
|
1460
|
+
running_platform,
|
|
1461
|
+
)
|
|
1462
|
+
add_standardized_metric_bybranch(
|
|
1463
|
+
"dataset_load_duration",
|
|
1464
|
+
dataset_load_duration_seconds,
|
|
1465
|
+
str(tf_github_branch),
|
|
1466
|
+
deployment_name,
|
|
1467
|
+
deployment_type,
|
|
1468
|
+
rts,
|
|
1469
|
+
start_time_ms,
|
|
1470
|
+
test_name,
|
|
1471
|
+
tf_github_org,
|
|
1472
|
+
tf_github_repo,
|
|
1473
|
+
tf_triggering_env,
|
|
1474
|
+
metadata_tags,
|
|
1475
|
+
build_variant_name,
|
|
1476
|
+
running_platform,
|
|
1477
|
+
)
|
|
1478
|
+
if artifact_version is not None and artifact_version != "":
|
|
1479
|
+
add_standardized_metric_byversion(
|
|
1480
|
+
"benchmark_duration",
|
|
1481
|
+
benchmark_duration_seconds,
|
|
1482
|
+
artifact_version,
|
|
1483
|
+
deployment_name,
|
|
1484
|
+
deployment_type,
|
|
1485
|
+
rts,
|
|
1486
|
+
start_time_ms,
|
|
1487
|
+
test_name,
|
|
1488
|
+
tf_github_org,
|
|
1489
|
+
tf_github_repo,
|
|
1490
|
+
tf_triggering_env,
|
|
1491
|
+
metadata_tags,
|
|
1492
|
+
build_variant_name,
|
|
1493
|
+
running_platform,
|
|
1494
|
+
)
|
|
1495
|
+
add_standardized_metric_byversion(
|
|
1496
|
+
"dataset_load_duration",
|
|
1497
|
+
dataset_load_duration_seconds,
|
|
1498
|
+
artifact_version,
|
|
1499
|
+
deployment_name,
|
|
1500
|
+
deployment_type,
|
|
1501
|
+
rts,
|
|
1502
|
+
start_time_ms,
|
|
1503
|
+
test_name,
|
|
1504
|
+
tf_github_org,
|
|
1505
|
+
tf_github_repo,
|
|
1506
|
+
tf_triggering_env,
|
|
1507
|
+
metadata_tags,
|
|
1508
|
+
build_variant_name,
|
|
1509
|
+
running_platform,
|
|
1510
|
+
)
|
|
1511
|
+
except redis.exceptions.ResponseError as e:
|
|
1512
|
+
logging.warning(
|
|
1513
|
+
"Error while updating secondary data structures {}. ".format(e.__str__())
|
|
1514
|
+
)
|
|
1515
|
+
pass
|
|
1516
|
+
|
|
1517
|
+
|
|
1518
|
+
def get_start_time_vars(start_time=None):
|
|
1519
|
+
if start_time is None:
|
|
1520
|
+
start_time = datetime.datetime.utcnow()
|
|
1521
|
+
start_time_ms = int(
|
|
1522
|
+
(start_time - datetime.datetime(1970, 1, 1)).total_seconds() * 1000
|
|
1523
|
+
)
|
|
1524
|
+
start_time_str = start_time.strftime("%Y-%m-%d-%H-%M-%S")
|
|
1525
|
+
return start_time, start_time_ms, start_time_str
|
|
1526
|
+
|
|
1527
|
+
|
|
1528
|
+
def timeseries_test_failure_flow(
|
|
1529
|
+
args,
|
|
1530
|
+
deployment_name,
|
|
1531
|
+
deployment_type,
|
|
1532
|
+
rts,
|
|
1533
|
+
start_time_ms,
|
|
1534
|
+
tf_github_org,
|
|
1535
|
+
tf_github_repo,
|
|
1536
|
+
tf_triggering_env,
|
|
1537
|
+
tsname_project_total_failures,
|
|
1538
|
+
):
|
|
1539
|
+
if args.push_results_redistimeseries:
|
|
1540
|
+
if start_time_ms is None:
|
|
1541
|
+
_, start_time_ms, _ = get_start_time_vars()
|
|
1542
|
+
try:
|
|
1543
|
+
rts.ts().incrby(
|
|
1544
|
+
tsname_project_total_failures,
|
|
1545
|
+
1,
|
|
1546
|
+
timestamp=start_time_ms,
|
|
1547
|
+
labels=get_project_ts_tags(
|
|
1548
|
+
tf_github_org,
|
|
1549
|
+
tf_github_repo,
|
|
1550
|
+
deployment_name,
|
|
1551
|
+
deployment_type,
|
|
1552
|
+
tf_triggering_env,
|
|
1553
|
+
),
|
|
1554
|
+
)
|
|
1555
|
+
except redis.exceptions.ResponseError as e:
|
|
1556
|
+
logging.warning(
|
|
1557
|
+
"Error while updating secondary data structures {}. ".format(
|
|
1558
|
+
e.__str__()
|
|
1559
|
+
)
|
|
1560
|
+
)
|
|
1561
|
+
pass
|
|
1562
|
+
|
|
1563
|
+
|
|
1564
|
+
def datasink_profile_tabular_data(
|
|
1565
|
+
github_branch,
|
|
1566
|
+
github_org_name,
|
|
1567
|
+
github_repo_name,
|
|
1568
|
+
github_sha,
|
|
1569
|
+
overall_tabular_data_map,
|
|
1570
|
+
rts,
|
|
1571
|
+
setup_type,
|
|
1572
|
+
start_time_ms,
|
|
1573
|
+
start_time_str,
|
|
1574
|
+
test_name,
|
|
1575
|
+
tf_triggering_env,
|
|
1576
|
+
):
|
|
1577
|
+
zset_profiles_key_name = get_profilers_rts_key_prefix(
|
|
1578
|
+
tf_triggering_env,
|
|
1579
|
+
github_org_name,
|
|
1580
|
+
github_repo_name,
|
|
1581
|
+
)
|
|
1582
|
+
profile_test_suffix = "{start_time_str}:{test_name}/{setup_type}/{github_branch}/{github_hash}".format(
|
|
1583
|
+
start_time_str=start_time_str,
|
|
1584
|
+
test_name=test_name,
|
|
1585
|
+
setup_type=setup_type,
|
|
1586
|
+
github_branch=github_branch,
|
|
1587
|
+
github_hash=github_sha,
|
|
1588
|
+
)
|
|
1589
|
+
rts.zadd(
|
|
1590
|
+
zset_profiles_key_name,
|
|
1591
|
+
{profile_test_suffix: start_time_ms},
|
|
1592
|
+
)
|
|
1593
|
+
for (
|
|
1594
|
+
profile_tabular_type,
|
|
1595
|
+
tabular_data,
|
|
1596
|
+
) in overall_tabular_data_map.items():
|
|
1597
|
+
tabular_suffix = "{}:{}".format(profile_tabular_type, profile_test_suffix)
|
|
1598
|
+
logging.info(
|
|
1599
|
+
"Pushing to data-sink tabular data from pprof ({}). Tabular suffix: {}".format(
|
|
1600
|
+
profile_tabular_type, tabular_suffix
|
|
1601
|
+
)
|
|
1602
|
+
)
|
|
1603
|
+
|
|
1604
|
+
table_columns_text_key = "{}:columns:text".format(tabular_suffix)
|
|
1605
|
+
table_columns_type_key = "{}:columns:type".format(tabular_suffix)
|
|
1606
|
+
logging.info(
|
|
1607
|
+
"Pushing list key (named {}) the following column text: {}".format(
|
|
1608
|
+
table_columns_text_key, tabular_data["columns:text"]
|
|
1609
|
+
)
|
|
1610
|
+
)
|
|
1611
|
+
rts.rpush(table_columns_text_key, *tabular_data["columns:text"])
|
|
1612
|
+
logging.info(
|
|
1613
|
+
"Pushing list key (named {}) the following column types: {}".format(
|
|
1614
|
+
table_columns_type_key, tabular_data["columns:type"]
|
|
1615
|
+
)
|
|
1616
|
+
)
|
|
1617
|
+
rts.rpush(table_columns_type_key, *tabular_data["columns:type"])
|
|
1618
|
+
for row_name in tabular_data["columns:text"]:
|
|
1619
|
+
table_row_key = "{}:rows:{}".format(tabular_suffix, row_name)
|
|
1620
|
+
row_values = tabular_data["rows:{}".format(row_name)]
|
|
1621
|
+
rts.rpush(table_row_key, *row_values)
|