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.
Files changed (336) hide show
  1. redis_benchmarks_specification/__api__/Readme.md +7 -0
  2. redis_benchmarks_specification/__api__/__init__.py +5 -0
  3. redis_benchmarks_specification/__api__/api.py +87 -0
  4. redis_benchmarks_specification/__api__/app.py +191 -0
  5. redis_benchmarks_specification/__builder__/Readme.md +7 -0
  6. redis_benchmarks_specification/__builder__/__init__.py +5 -0
  7. redis_benchmarks_specification/__builder__/builder.py +1010 -0
  8. redis_benchmarks_specification/__builder__/schema.py +23 -0
  9. redis_benchmarks_specification/__cli__/__init__.py +5 -0
  10. redis_benchmarks_specification/__cli__/args.py +226 -0
  11. redis_benchmarks_specification/__cli__/cli.py +624 -0
  12. redis_benchmarks_specification/__cli__/stats.py +1304 -0
  13. redis_benchmarks_specification/__common__/__init__.py +0 -0
  14. redis_benchmarks_specification/__common__/builder_schema.py +256 -0
  15. redis_benchmarks_specification/__common__/env.py +96 -0
  16. redis_benchmarks_specification/__common__/github.py +280 -0
  17. redis_benchmarks_specification/__common__/package.py +28 -0
  18. redis_benchmarks_specification/__common__/runner.py +485 -0
  19. redis_benchmarks_specification/__common__/spec.py +143 -0
  20. redis_benchmarks_specification/__common__/suppress_warnings.py +20 -0
  21. redis_benchmarks_specification/__common__/timeseries.py +1621 -0
  22. redis_benchmarks_specification/__compare__/__init__.py +5 -0
  23. redis_benchmarks_specification/__compare__/args.py +240 -0
  24. redis_benchmarks_specification/__compare__/compare.py +3322 -0
  25. redis_benchmarks_specification/__init__.py +15 -0
  26. redis_benchmarks_specification/__runner__/__init__.py +5 -0
  27. redis_benchmarks_specification/__runner__/args.py +334 -0
  28. redis_benchmarks_specification/__runner__/remote_profiling.py +535 -0
  29. redis_benchmarks_specification/__runner__/runner.py +3837 -0
  30. redis_benchmarks_specification/__self_contained_coordinator__/__init__.py +5 -0
  31. redis_benchmarks_specification/__self_contained_coordinator__/args.py +210 -0
  32. redis_benchmarks_specification/__self_contained_coordinator__/artifacts.py +27 -0
  33. redis_benchmarks_specification/__self_contained_coordinator__/build_info.py +61 -0
  34. redis_benchmarks_specification/__self_contained_coordinator__/clients.py +58 -0
  35. redis_benchmarks_specification/__self_contained_coordinator__/cpuset.py +17 -0
  36. redis_benchmarks_specification/__self_contained_coordinator__/docker.py +108 -0
  37. redis_benchmarks_specification/__self_contained_coordinator__/post_processing.py +19 -0
  38. redis_benchmarks_specification/__self_contained_coordinator__/prepopulation.py +96 -0
  39. redis_benchmarks_specification/__self_contained_coordinator__/runners.py +740 -0
  40. redis_benchmarks_specification/__self_contained_coordinator__/self_contained_coordinator.py +2554 -0
  41. redis_benchmarks_specification/__setups__/__init__.py +0 -0
  42. redis_benchmarks_specification/__setups__/topologies.py +17 -0
  43. redis_benchmarks_specification/__spec__/__init__.py +5 -0
  44. redis_benchmarks_specification/__spec__/args.py +78 -0
  45. redis_benchmarks_specification/__spec__/cli.py +259 -0
  46. redis_benchmarks_specification/__watchdog__/__init__.py +5 -0
  47. redis_benchmarks_specification/__watchdog__/args.py +54 -0
  48. redis_benchmarks_specification/__watchdog__/watchdog.py +175 -0
  49. redis_benchmarks_specification/commands/__init__.py +0 -0
  50. redis_benchmarks_specification/commands/commands.py +15 -0
  51. redis_benchmarks_specification/setups/builders/gcc:15.2.0-amd64-debian-bookworm-default.yml +20 -0
  52. redis_benchmarks_specification/setups/builders/gcc:15.2.0-arm64-debian-bookworm-default.yml +20 -0
  53. redis_benchmarks_specification/setups/platforms/aws-ec2-1node-c5.4xlarge.yml +27 -0
  54. redis_benchmarks_specification/setups/topologies/topologies.yml +153 -0
  55. redis_benchmarks_specification/test-suites/defaults.yml +32 -0
  56. redis_benchmarks_specification/test-suites/generate.py +114 -0
  57. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-hash-hexpire-5-fields-10B-values.yml +43 -0
  58. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-hash-hexpire-50-fields-10B-values.yml +53 -0
  59. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-hash-hexpireat-5-fields-10B-values.yml +43 -0
  60. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-hash-hexpireat-50-fields-10B-values.yml +53 -0
  61. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-hash-hgetall-50-fields-100B-values.yml +52 -0
  62. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-hash-hgetex-5-fields-10B-values.yml +43 -0
  63. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-hash-hgetex-50-fields-10B-values.yml +53 -0
  64. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-hash-hgetex-persist-50-fields-10B-values.yml +53 -0
  65. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-hash-hpexpire-5-fields-10B-values.yml +43 -0
  66. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-hash-hpexpire-50-fields-10B-values.yml +53 -0
  67. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-hash-hpexpireat-5-fields-10B-values.yml +43 -0
  68. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-hash-hpexpireat-50-fields-10B-values.yml +53 -0
  69. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-hash-htll-50-fields-10B-values.yml +53 -0
  70. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-1-fields-with-1000B-values-expiration.yml +35 -0
  71. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-1-fields-with-10B-values-expiration.yml +34 -0
  72. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-1-fields-with-10B-values-long-expiration.yml +35 -0
  73. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-1-fields-with-10B-values-short-expiration.yml +35 -0
  74. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-20-fields-with-1B-values-pipeline-30.yml +43 -0
  75. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-5-fields-with-1000B-values-expiration.yml +36 -0
  76. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-5-fields-with-10B-values-expiration.yml +35 -0
  77. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-5-fields-with-10B-values-long-expiration.yml +36 -0
  78. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-5-fields-with-10B-values-short-expiration.yml +36 -0
  79. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-50-fields-with-1000B-values-expiration.yml +45 -0
  80. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-50-fields-with-1000B-values.yml +44 -0
  81. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-50-fields-with-100B-values.yml +44 -0
  82. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-50-fields-with-10B-values-expiration.yml +44 -0
  83. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-50-fields-with-10B-values-long-expiration.yml +45 -0
  84. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-50-fields-with-10B-values-short-expiration.yml +45 -0
  85. redis_benchmarks_specification/test-suites/memtier_benchmark-100Kkeys-load-hash-50-fields-with-10B-values.yml +43 -0
  86. redis_benchmarks_specification/test-suites/memtier_benchmark-10Kkeys-load-hash-50-fields-with-10000B-values.yml +44 -0
  87. redis_benchmarks_specification/test-suites/memtier_benchmark-10Kkeys-load-list-rpush-bulkload-pipeline-50.yml +39 -0
  88. redis_benchmarks_specification/test-suites/memtier_benchmark-10Kkeys-load-list-with-10B-values-pipeline-50.yml +33 -0
  89. redis_benchmarks_specification/test-suites/memtier_benchmark-10Mkeys-load-hash-5-fields-with-100B-values-pipeline-10.yml +33 -0
  90. redis_benchmarks_specification/test-suites/memtier_benchmark-10Mkeys-load-hash-5-fields-with-100B-values.yml +33 -0
  91. redis_benchmarks_specification/test-suites/memtier_benchmark-10Mkeys-load-hash-5-fields-with-10B-values-pipeline-10.yml +34 -0
  92. redis_benchmarks_specification/test-suites/memtier_benchmark-10Mkeys-load-hash-5-fields-with-10B-values.yml +33 -0
  93. redis_benchmarks_specification/test-suites/memtier_benchmark-10Mkeys-string-get-10B-pipeline-100-nokeyprefix.yml +38 -0
  94. redis_benchmarks_specification/test-suites/memtier_benchmark-1Kkeys-hash-listpack-500-fields-update-20-fields-with-1B-to-64B-values.yml +75 -0
  95. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-100B-expire-use-case.yml +50 -0
  96. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-10B-expire-use-case.yml +50 -0
  97. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-10B-psetex-expire-use-case.yml +43 -0
  98. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-10B-setex-expire-use-case.yml +43 -0
  99. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-1KiB-expire-use-case.yml +49 -0
  100. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-4KiB-expire-use-case.yml +50 -0
  101. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-bitmap-getbit-pipeline-10.yml +42 -0
  102. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-exists-pipeline-10.yml +41 -0
  103. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-expire-pipeline-10.yml +41 -0
  104. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-expireat-pipeline-10.yml +41 -0
  105. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-pexpire-pipeline-10.yml +41 -0
  106. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-scan-count-500-pipeline-10.yml +41 -0
  107. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-scan-cursor-count-500-pipeline-10.yml +42 -0
  108. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-scan-cursor-count-5000-pipeline-10.yml +42 -0
  109. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-scan-cursor-pipeline-10.yml +42 -0
  110. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-scan-pipeline-10.yml +41 -0
  111. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-scan-type-pipeline-10.yml +41 -0
  112. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-touch-pipeline-10.yml +41 -0
  113. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-generic-ttl-pipeline-10.yml +41 -0
  114. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hexists.yml +45 -0
  115. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hget-hgetall-hkeys-hvals-with-100B-values.yml +48 -0
  116. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hgetall-50-fields-10B-values.yml +53 -0
  117. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hincrby.yml +42 -0
  118. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hincrbyfloat.yml +42 -0
  119. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hkeys-10-fields-with-10B-values-with-expiration-pipeline-10.yml +45 -0
  120. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hkeys-5-fields-with-100B-values-with-expiration-pipeline-10.yml +44 -0
  121. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hkeys-5-fields-with-10B-values-with-expiration-pipeline-10.yml +44 -0
  122. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hkeys-50-fields-with-10B-values-with-expiration-pipeline-10.yml +54 -0
  123. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-hmget-5-fields-with-100B-values-pipeline-10.yml +44 -0
  124. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-hash-transactions-multi-exec-pipeline-20.yml +43 -0
  125. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-list-lpop-rpop-with-100B-values.yml +44 -0
  126. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-list-lpop-rpop-with-10B-values.yml +44 -0
  127. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-list-lpop-rpop-with-1KiB-values.yml +44 -0
  128. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-list-rpoplpush-with-10B-values.yml +42 -0
  129. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-hash-5-fields-with-1000B-values-pipeline-10.yml +34 -0
  130. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-hash-5-fields-with-1000B-values.yml +33 -0
  131. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-hash-50-fields-with-10B-values-long-expiration-pipeline-10.yml +46 -0
  132. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-hash-hmset-5-fields-with-1000B-values.yml +33 -0
  133. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-list-rpush-with-10B-values.yml +32 -0
  134. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-list-with-100B-values.yml +32 -0
  135. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-list-with-10B-values-pipeline-10.yml +33 -0
  136. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-list-with-10B-values.yml +32 -0
  137. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-list-with-1KiB-values.yml +32 -0
  138. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-set-intset-with-100-elements-19-digits-pipeline-10.yml +58 -0
  139. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-set-intset-with-100-elements-19-digits.yml +58 -0
  140. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-set-intset-with-100-elements-pipeline-10.yml +41 -0
  141. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-set-intset-with-100-elements.yml +40 -0
  142. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-stream-1-fields-with-100B-values-pipeline-10.yml +33 -0
  143. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-stream-1-fields-with-100B-values.yml +33 -0
  144. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-stream-5-fields-with-100B-values-pipeline-10.yml +34 -0
  145. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-stream-5-fields-with-100B-values.yml +33 -0
  146. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-100B-values-pipeline-10.yml +32 -0
  147. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-100B-values.yml +35 -0
  148. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-10B-values-pipeline-10.yml +33 -0
  149. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-10B-values-pipeline-100-nokeyprefix.yml +29 -0
  150. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-10B-values-pipeline-100.yml +33 -0
  151. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-10B-values-pipeline-50.yml +33 -0
  152. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-10B-values-pipeline-500.yml +33 -0
  153. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-10B-values.yml +32 -0
  154. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-1KiB-values-pipeline-10.yml +32 -0
  155. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-1KiB-values.yml +32 -0
  156. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-string-with-20KiB-values.yml +35 -0
  157. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-zset-listpack-with-100-elements-double-score.yml +91 -0
  158. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-zset-with-10-elements-double-score.yml +35 -0
  159. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-load-zset-with-10-elements-int-score.yml +34 -0
  160. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-append-1-100B-pipeline-10.yml +43 -0
  161. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-append-1-100B.yml +42 -0
  162. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-decr.yml +41 -0
  163. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-100B-pipeline-10.yml +41 -0
  164. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-100B.yml +41 -0
  165. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-10B-pipeline-10.yml +41 -0
  166. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-10B-pipeline-100-nokeyprefix.yml +38 -0
  167. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-10B-pipeline-100.yml +41 -0
  168. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-10B-pipeline-50.yml +41 -0
  169. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-10B-pipeline-500.yml +41 -0
  170. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-10B.yml +41 -0
  171. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-1KiB-pipeline-10.yml +41 -0
  172. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-1KiB.yml +41 -0
  173. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-32B-pipeline-10.yml +40 -0
  174. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-32B.yml +40 -0
  175. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-incr-pipeline-10.yml +30 -0
  176. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-incrby-pipeline-10.yml +30 -0
  177. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-incrby.yml +30 -0
  178. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-incrbyfloat-pipeline-10.yml +30 -0
  179. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-incrbyfloat.yml +30 -0
  180. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-int-encoding-strlen-pipeline-10.yml +40 -0
  181. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-mget-1KiB.yml +41 -0
  182. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-mixed-50-50-set-get-100B-expire-pipeline-10.yml +45 -0
  183. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-mixed-50-50-set-get-100B-expire.yml +45 -0
  184. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-mixed-50-50-set-get-100B-pipeline-10.yml +43 -0
  185. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-mixed-50-50-set-get-100B.yml +42 -0
  186. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-mixed-50-50-set-get-1KB-pipeline-10.yml +42 -0
  187. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-mixed-50-50-set-get-1KB.yml +41 -0
  188. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-mixed-50-50-set-get-32B-pipeline-10.yml +43 -0
  189. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-mixed-50-50-set-get-32B.yml +42 -0
  190. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-mixed-50-50-set-get-512B-pipeline-10.yml +43 -0
  191. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-mixed-50-50-set-get-512B.yml +42 -0
  192. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-mixed-50-50-set-get-with-expiration-240B-400_conns.yml +47 -0
  193. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-set-with-ex-100B-pipeline-10.yml +41 -0
  194. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-setex-100B-pipeline-10.yml +41 -0
  195. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-setget200c-1KiB-pipeline-1.yml +43 -0
  196. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-setget200c-1KiB-pipeline-10.yml +43 -0
  197. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-setget200c-4KiB-pipeline-1.yml +43 -0
  198. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-setget200c-4KiB-pipeline-10.yml +43 -0
  199. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-setget200c-512B-pipeline-1.yml +43 -0
  200. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-setget200c-512B-pipeline-10.yml +43 -0
  201. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-setrange-100B-pipeline-10.yml +42 -0
  202. redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-setrange-100B.yml +42 -0
  203. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-100M-bits-bitmap-bitcount.yml +45 -0
  204. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-1Billion-bits-bitmap-bitcount.yml +45 -0
  205. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-2-elements-geopos.yml +38 -0
  206. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-2-elements-geosearch-fromlonlat-withcoord.yml +39 -0
  207. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-60M-elements-geodist-pipeline-10.yml +36 -0
  208. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-60M-elements-geodist.yml +36 -0
  209. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-60M-elements-geohash-pipeline-10.yml +35 -0
  210. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-60M-elements-geohash.yml +34 -0
  211. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-60M-elements-geopos-pipeline-10.yml +35 -0
  212. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-60M-elements-geopos.yml +34 -0
  213. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-60M-elements-geosearch-fromlonlat-bybox.yml +36 -0
  214. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-60M-elements-geosearch-fromlonlat-pipeline-10.yml +36 -0
  215. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-geo-60M-elements-geosearch-fromlonlat.yml +36 -0
  216. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-hash-1K-fields-hgetall-pipeline-10.yml +285 -0
  217. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-hash-1K-fields-hgetall.yml +284 -0
  218. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-hash-hscan-1K-fields-100B-values-cursor-count-1000.yml +291 -0
  219. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-hash-hscan-1K-fields-10B-values-cursor-count-100.yml +291 -0
  220. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-hash-hscan-1K-fields-10B-values.yml +290 -0
  221. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-hash-hscan-50-fields-10B-values.yml +54 -0
  222. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-10-elements-lrange-all-elements-pipeline-10.yml +37 -0
  223. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-10-elements-lrange-all-elements.yml +36 -0
  224. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-100-elements-int-7bit-uint-lrange-all-elements-pipeline-10.yml +44 -0
  225. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-100-elements-int-lrange-all-elements-pipeline-10.yml +52 -0
  226. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-100-elements-llen-pipeline-10.yml +52 -0
  227. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-100-elements-lrange-all-elements-pipeline-10.yml +52 -0
  228. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-100-elements-lrange-all-elements.yml +51 -0
  229. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-10K-elements-lindex-integer.yml +41 -0
  230. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-10K-elements-lindex-string-pipeline-10.yml +42 -0
  231. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-10K-elements-lindex-string.yml +41 -0
  232. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-10K-elements-linsert-lrem-integer.yml +45 -0
  233. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-10K-elements-linsert-lrem-string.yml +45 -0
  234. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-10K-elements-lpos-integer.yml +41 -0
  235. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-10K-elements-lpos-string.yml +41 -0
  236. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-1K-elements-lrange-all-elements-pipeline-10.yml +202 -0
  237. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-1K-elements-lrange-all-elements.yml +201 -0
  238. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-list-2K-elements-quicklist-lrange-all-elements-longs.yml +258 -0
  239. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-load-hash-1K-fields-with-5B-values.yml +282 -0
  240. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-load-zset-with-5-elements-parsing-float-score.yml +36 -0
  241. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-load-zset-with-5-elements-parsing-hexa-score.yml +36 -0
  242. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-pfadd-4KB-values-pipeline-10.yml +32 -0
  243. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-10-elements-smembers-pipeline-10.yml +37 -0
  244. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-10-elements-smembers.yml +36 -0
  245. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-10-elements-smismember.yml +38 -0
  246. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-100-elements-sismember-is-a-member.yml +53 -0
  247. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-100-elements-sismember-not-a-member.yml +53 -0
  248. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-100-elements-smembers.yml +50 -0
  249. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-100-elements-smismember.yml +54 -0
  250. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-100-elements-sscan.yml +50 -0
  251. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-10M-elements-sismember-50pct-chance.yml +41 -0
  252. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-10M-elements-srem-50pct-chance.yml +40 -0
  253. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-1K-elements-smembers.yml +200 -0
  254. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-1K-elements-sscan-cursor-count-100.yml +201 -0
  255. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-1K-elements-sscan.yml +200 -0
  256. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-1M-elements-sismember-50pct-chance.yml +40 -0
  257. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-200K-elements-sadd-constant.yml +41 -0
  258. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-set-2M-elements-sadd-increasing.yml +32 -0
  259. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zincrby-1M-elements-pipeline-1.yml +40 -0
  260. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zrank-100K-elements-pipeline-1.yml +40 -0
  261. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zrank-10M-elements-pipeline-1.yml +41 -0
  262. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zrank-1M-elements-pipeline-1.yml +40 -0
  263. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zrem-5M-elements-pipeline-1.yml +47 -0
  264. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zrevrangebyscore-256K-elements-pipeline-1.yml +41 -0
  265. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zrevrangebyscore-256K-elements-pipeline-10.yml +41 -0
  266. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zrevrank-1M-elements-pipeline-1.yml +40 -0
  267. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-10-elements-zrange-all-elements-long-scores.yml +41 -0
  268. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-10-elements-zrange-all-elements.yml +40 -0
  269. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-100-elements-zrange-all-elements.yml +66 -0
  270. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-100-elements-zrangebyscore-all-elements-long-scores.yml +66 -0
  271. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-100-elements-zrangebyscore-all-elements.yml +66 -0
  272. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-100-elements-zscan.yml +65 -0
  273. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-1K-elements-zrange-all-elements.yml +322 -0
  274. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-1K-elements-zscan.yml +321 -0
  275. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-1M-elements-zcard-pipeline-10.yml +39 -0
  276. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-1M-elements-zremrangebyscore-pipeline-10.yml +41 -0
  277. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-1M-elements-zrevrange-5-elements.yml +40 -0
  278. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-1M-elements-zrevrange-withscores-5-elements-pipeline-10.yml +41 -0
  279. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-1M-elements-zscore-pipeline-10.yml +40 -0
  280. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-600K-elements-zrangestore-1K-elements.yml +41 -0
  281. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-600K-elements-zrangestore-300K-elements.yml +43 -0
  282. redis_benchmarks_specification/test-suites/memtier_benchmark-1key-zset-listpack-zrank-100-elements-pipeline-1.yml +50 -0
  283. redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-lua-eval-hset-expire.yml +37 -0
  284. redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-lua-evalsha-hset-expire.yml +41 -0
  285. redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-set-10-100-elements-sdiff.yml +57 -0
  286. redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-set-10-100-elements-sinter.yml +57 -0
  287. redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-set-10-100-elements-sunion.yml +57 -0
  288. redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-stream-5-entries-xread-all-entries-pipeline-10.yml +46 -0
  289. redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-stream-5-entries-xread-all-entries.yml +46 -0
  290. redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-zset-300-elements-skiplist-encoded-zunion.yml +434 -0
  291. redis_benchmarks_specification/test-suites/memtier_benchmark-2keys-zset-300-elements-skiplist-encoded-zunionstore.yml +434 -0
  292. redis_benchmarks_specification/test-suites/memtier_benchmark-3Mkeys-load-string-with-512B-values-pipeline-10.yml +37 -0
  293. redis_benchmarks_specification/test-suites/memtier_benchmark-3Mkeys-load-string-with-512B-values.yml +37 -0
  294. redis_benchmarks_specification/test-suites/memtier_benchmark-3Mkeys-string-get-with-1KiB-values-400_conns.yml +45 -0
  295. redis_benchmarks_specification/test-suites/memtier_benchmark-3Mkeys-string-get-with-1KiB-values-40_conns.yml +45 -0
  296. redis_benchmarks_specification/test-suites/memtier_benchmark-3Mkeys-string-get-with-1KiB-values-pipeline-10-2000_conns.yml +46 -0
  297. redis_benchmarks_specification/test-suites/memtier_benchmark-3Mkeys-string-get-with-1KiB-values-pipeline-10-400_conns.yml +46 -0
  298. redis_benchmarks_specification/test-suites/memtier_benchmark-3Mkeys-string-get-with-1KiB-values-pipeline-10-40_conns.yml +46 -0
  299. redis_benchmarks_specification/test-suites/memtier_benchmark-3Mkeys-string-mixed-20-80-with-512B-values-400_conns.yml +45 -0
  300. redis_benchmarks_specification/test-suites/memtier_benchmark-3Mkeys-string-mixed-20-80-with-512B-values-pipeline-10-2000_conns.yml +46 -0
  301. redis_benchmarks_specification/test-suites/memtier_benchmark-3Mkeys-string-mixed-20-80-with-512B-values-pipeline-10-400_conns.yml +46 -0
  302. redis_benchmarks_specification/test-suites/memtier_benchmark-3Mkeys-string-mixed-20-80-with-512B-values-pipeline-10-5200_conns.yml +46 -0
  303. redis_benchmarks_specification/test-suites/memtier_benchmark-3Mkeys-string-mixed-50-50-with-512B-values-with-expiration-pipeline-10-400_conns.yml +43 -0
  304. redis_benchmarks_specification/test-suites/memtier_benchmark-connection-hello-pipeline-10.yml +32 -0
  305. redis_benchmarks_specification/test-suites/memtier_benchmark-connection-hello.yml +32 -0
  306. redis_benchmarks_specification/test-suites/memtier_benchmark-multiple-hll-pfcount-100B-values.yml +34 -0
  307. redis_benchmarks_specification/test-suites/memtier_benchmark-multiple-hll-pfmerge-100B-values.yml +34 -0
  308. redis_benchmarks_specification/test-suites/memtier_benchmark-nokeys-connection-ping-pipeline-10.yml +29 -0
  309. redis_benchmarks_specification/test-suites/memtier_benchmark-nokeys-pubsub-mixed-100-channels-128B-100-publishers-100-subscribers.yml +40 -0
  310. redis_benchmarks_specification/test-suites/memtier_benchmark-nokeys-pubsub-mixed-100-channels-128B-100-publishers-1000-subscribers.yml +40 -0
  311. redis_benchmarks_specification/test-suites/memtier_benchmark-nokeys-pubsub-mixed-100-channels-128B-100-publishers-5000-subscribers.yml +40 -0
  312. redis_benchmarks_specification/test-suites/memtier_benchmark-nokeys-pubsub-mixed-100-channels-128B-100-publishers-50K-subscribers-5k-conns.yml +40 -0
  313. redis_benchmarks_specification/test-suites/memtier_benchmark-nokeys-pubsub-publish-1K-channels-10B-no-subscribers.yml +30 -0
  314. redis_benchmarks_specification/test-suites/memtier_benchmark-nokeys-server-time-pipeline-10.yml +29 -0
  315. redis_benchmarks_specification/test-suites/memtier_benchmark-playbook-leaderboard-top-10.yml +68 -0
  316. redis_benchmarks_specification/test-suites/memtier_benchmark-playbook-leaderboard-top-100.yml +69 -0
  317. redis_benchmarks_specification/test-suites/memtier_benchmark-playbook-leaderboard-top-1000.yml +68 -0
  318. redis_benchmarks_specification/test-suites/memtier_benchmark-playbook-rate-limiting-lua-100k-sessions.yml +64 -0
  319. redis_benchmarks_specification/test-suites/memtier_benchmark-playbook-realtime-analytics-membership-pipeline-10.yml +56 -0
  320. redis_benchmarks_specification/test-suites/memtier_benchmark-playbook-realtime-analytics-membership.yml +56 -0
  321. redis_benchmarks_specification/test-suites/memtier_benchmark-playbook-session-caching-hash-100k-sessions.yml +108 -0
  322. redis_benchmarks_specification/test-suites/memtier_benchmark-playbook-session-caching-json-100k-sessions.yml +109 -0
  323. redis_benchmarks_specification/test-suites/memtier_benchmark-playbook-session-caching-string-100k-sessions.yml +98 -0
  324. redis_benchmarks_specification/test-suites/memtier_benchmark-playbook-session-storage-100k-sessions.yml +205 -0
  325. redis_benchmarks_specification/test-suites/memtier_benchmark-playbook-session-storage-1k-sessions.yml +205 -0
  326. redis_benchmarks_specification/test-suites/memtier_benchmark-stream-10M-entries-xread-count-100.yml +36 -0
  327. redis_benchmarks_specification/test-suites/memtier_benchmark-stream-10M-entries-xreadgroup-count-100-noack.yml +38 -0
  328. redis_benchmarks_specification/test-suites/memtier_benchmark-stream-10M-entries-xreadgroup-count-100.yml +38 -0
  329. redis_benchmarks_specification/test-suites/memtier_benchmark-stream-concurrent-xadd-xreadgroup-70-30.yml +50 -0
  330. redis_benchmarks_specification/test-suites/template.txt +18 -0
  331. redis_benchmarks_specification/vector-search-test-suites/vector_db_benchmark_test.yml +41 -0
  332. redis_benchmarks_specification-0.2.42.dist-info/LICENSE +201 -0
  333. redis_benchmarks_specification-0.2.42.dist-info/METADATA +434 -0
  334. redis_benchmarks_specification-0.2.42.dist-info/RECORD +336 -0
  335. redis_benchmarks_specification-0.2.42.dist-info/WHEEL +4 -0
  336. redis_benchmarks_specification-0.2.42.dist-info/entry_points.txt +10 -0
File without changes
@@ -0,0 +1,256 @@
1
+ # BSD 3-Clause License
2
+ #
3
+ # Copyright (c) 2021., Redis Labs Modules
4
+ # All rights reserved.
5
+ #
6
+ import logging
7
+ import os
8
+ import tempfile
9
+ import zipfile
10
+ import git
11
+ from urllib.error import URLError
12
+ from urllib.request import urlopen
13
+ from github import Github
14
+
15
+ import redis
16
+
17
+ from redis_benchmarks_specification.__common__.env import (
18
+ STREAM_KEYNAME_GH_EVENTS_COMMIT,
19
+ )
20
+
21
+
22
+ def commit_schema_to_stream(
23
+ fields: dict,
24
+ conn: redis.StrictRedis,
25
+ gh_org,
26
+ gh_repo,
27
+ gh_token=None,
28
+ local_repo_path=None,
29
+ ):
30
+ """uses to the provided JSON dict of fields and pushes that info to the corresponding stream"""
31
+ fields = fields
32
+ reply_fields = dict(fields)
33
+ result = False
34
+ error_msg = None
35
+ use_git_timestamp = False
36
+ if "use_git_timestamp" in fields:
37
+ use_git_timestamp = bool(fields["use_git_timestamp"])
38
+ if "git_hash" not in fields:
39
+ error_msg = "Missing required 'git_hash' field"
40
+ else:
41
+ (
42
+ result,
43
+ error_msg,
44
+ fields,
45
+ _,
46
+ binary_key,
47
+ binary_value,
48
+ ) = get_commit_dict_from_sha(
49
+ fields["git_hash"],
50
+ gh_org,
51
+ gh_repo,
52
+ fields,
53
+ use_git_timestamp,
54
+ gh_token,
55
+ None, # gh_branch
56
+ local_repo_path,
57
+ )
58
+ reply_fields["use_git_timestamp"] = fields["use_git_timestamp"]
59
+ if "git_timestamp_ms" in fields:
60
+ reply_fields["git_timestamp_ms"] = fields["git_timestamp_ms"]
61
+ reply_fields["archived_zip"] = True
62
+ if result is True:
63
+ # 7 days expire
64
+ binary_exp_secs = 24 * 60 * 60 * 7
65
+ result, reply_fields, error_msg = request_build_from_commit_info(
66
+ conn, fields, reply_fields, binary_key, binary_value, binary_exp_secs
67
+ )
68
+
69
+ return result, reply_fields, error_msg
70
+
71
+
72
+ def get_archive_zip_from_hash(gh_org, gh_repo, git_hash, fields, local_repo_path=None):
73
+ error_msg = None
74
+ result = False
75
+ binary_value = None
76
+ bin_key = "zipped:source:{}/{}/archive/{}.zip".format(gh_org, gh_repo, git_hash)
77
+
78
+ if local_repo_path is not None:
79
+ # Create ZIP archive from local repository
80
+ try:
81
+ logging.info(
82
+ "Creating ZIP archive from local repository: {}".format(local_repo_path)
83
+ )
84
+
85
+ # Create a temporary ZIP file
86
+ temp_zip = tempfile.NamedTemporaryFile(delete=False, suffix=".zip")
87
+ temp_zip.close()
88
+
89
+ # Create ZIP archive from the local repository at the specific commit
90
+ repo = git.Repo(local_repo_path)
91
+
92
+ # Get the commit object
93
+ commit = repo.commit(git_hash)
94
+
95
+ # Create archive using git archive command with prefix to match GitHub structure
96
+ # GitHub creates archives with directory name like "redis-{commit_hash}"
97
+ archive_prefix = "{}-{}/".format(gh_repo, git_hash)
98
+ with open(temp_zip.name, "wb") as zip_file:
99
+ repo.archive(zip_file, commit, format="zip", prefix=archive_prefix)
100
+
101
+ # Read the ZIP file content
102
+ with open(temp_zip.name, "rb") as zip_file:
103
+ binary_value = zip_file.read()
104
+
105
+ # Clean up temporary file
106
+ os.unlink(temp_zip.name)
107
+
108
+ fields["zip_archive_key"] = bin_key
109
+ fields["zip_archive_len"] = len(binary_value)
110
+ result = True
111
+ logging.info(
112
+ "Successfully created ZIP archive from local repository. Size: {} bytes ({:.2f} MB)".format(
113
+ len(binary_value), len(binary_value) / (1024 * 1024)
114
+ )
115
+ )
116
+
117
+ except Exception as e:
118
+ error_msg = (
119
+ "Error creating ZIP archive from local repository {}: {}".format(
120
+ local_repo_path, str(e)
121
+ )
122
+ )
123
+ logging.error(error_msg)
124
+ result = False
125
+ else:
126
+ # Fetch from GitHub as before
127
+ github_url = "https://github.com/{}/{}/archive/{}.zip".format(
128
+ gh_org, gh_repo, git_hash
129
+ )
130
+ try:
131
+ logging.info("Fetching data from {}".format(github_url))
132
+ response = urlopen(github_url, timeout=5)
133
+ content = response.read()
134
+ fields["zip_archive_key"] = bin_key
135
+ fields["zip_archive_len"] = len(bytes(content))
136
+ binary_value = bytes(content)
137
+ result = True
138
+ except URLError as e:
139
+ error_msg = "Catched URLError while fetching {} content. Error {}".format(
140
+ github_url, e.__str__()
141
+ )
142
+ logging.error(error_msg)
143
+ result = False
144
+
145
+ return result, bin_key, binary_value, error_msg
146
+
147
+
148
+ def get_commit_dict_from_sha(
149
+ git_hash,
150
+ gh_org,
151
+ gh_repo,
152
+ commit_dict={},
153
+ use_git_timestamp=False,
154
+ gh_token=None,
155
+ gh_branch=None,
156
+ local_repo_path=None,
157
+ ):
158
+ commit = None
159
+ # using an access token - but only if we're not using a local repository
160
+ if gh_token is not None and local_repo_path is None:
161
+ g = Github(gh_token)
162
+ repo = g.get_repo("{}/{}".format(gh_org, gh_repo))
163
+ commit = repo.get_commit(sha=git_hash)
164
+ commit_dict["git_timestamp_ms"] = int(
165
+ commit.commit.author.date.timestamp() * 1000.0
166
+ )
167
+ elif local_repo_path is not None:
168
+ # For local repositories, get timestamp from local git repo
169
+ try:
170
+ local_repo = git.Repo(local_repo_path)
171
+ local_commit = local_repo.commit(git_hash)
172
+ commit_dict["git_timestamp_ms"] = int(local_commit.committed_date * 1000.0)
173
+ except Exception as e:
174
+ logging.warning(
175
+ "Could not get timestamp from local repository: {}".format(str(e))
176
+ )
177
+ if "git_timestamp_ms" not in commit_dict:
178
+ use_git_timestamp = False
179
+ else:
180
+ if "git_timestamp_ms" not in commit_dict:
181
+ use_git_timestamp = False
182
+ commit_dict["use_git_timestamp"] = str(use_git_timestamp)
183
+ commit_dict["git_hash"] = git_hash
184
+ if gh_branch is not None:
185
+ commit_dict["git_branch"] = gh_branch
186
+
187
+ result, binary_key, binary_value, error_msg = get_archive_zip_from_hash(
188
+ gh_org,
189
+ gh_repo,
190
+ git_hash,
191
+ commit_dict,
192
+ local_repo_path,
193
+ )
194
+ return result, error_msg, commit_dict, commit, binary_key, binary_value
195
+
196
+
197
+ def request_build_from_commit_info(
198
+ conn, fields, reply_fields, binary_key, binary_value, binary_exp_secs
199
+ ):
200
+ """Generates a build event from the commit dictionary
201
+ It expected the fields dictionary to contain at least the following keys:
202
+ - "git_branch": reference to the branch that the commit refers to
203
+ - "git_hash": reference to the commit hash
204
+ - "zip_archive": containing the source code archived binary
205
+ - "zip_archive_len": the length of the zip archived
206
+ - "archived_zip": boolean value specifying if the archive is zipped ( always true for now )
207
+
208
+ Parameters
209
+ ----------
210
+ conn : redis.Con
211
+ The redis client connection
212
+ fields : dict
213
+ The input commit info dictionary
214
+ reply_fields : dict
215
+ The output reply commit info dictionary
216
+
217
+ """
218
+ result = True
219
+ error_msg = None
220
+ conn.set(binary_key, binary_value, ex=binary_exp_secs)
221
+ for k, v in fields.items():
222
+ if type(v) not in [str, int, float, bytes]:
223
+ raise Exception(
224
+ "Type of field {} is not bytes, string, int or float. Type ({}). Value={}".format(
225
+ k, type(v), v
226
+ )
227
+ )
228
+ id = conn.xadd(STREAM_KEYNAME_GH_EVENTS_COMMIT.encode(), fields)
229
+ reply_fields["id"] = id
230
+ return result, reply_fields, error_msg
231
+
232
+
233
+ def get_branch_version_from_test_details(testDetails):
234
+ git_branch = None
235
+ git_version = None
236
+ if b"git_branch" in testDetails:
237
+ git_branch = testDetails[b"git_branch"]
238
+ if b"ref_label" in testDetails:
239
+ git_branch = testDetails[b"ref_label"]
240
+ if b"git_version" in testDetails:
241
+ git_version = testDetails[b"git_version"]
242
+ if git_branch is not None:
243
+ # remove event prefix
244
+ if type(git_branch) == bytes:
245
+ git_branch = git_branch.decode()
246
+ if git_branch.startswith("/refs/heads/"):
247
+ git_branch = git_branch.replace("/refs/heads/", "")
248
+ if git_branch.startswith("refs/heads/"):
249
+ git_branch = git_branch.replace("refs/heads/", "")
250
+ if git_branch.startswith("/"):
251
+ git_branch = git_branch[1:]
252
+ if git_version is not None:
253
+ if type(git_version) == bytes:
254
+ git_version = git_version.decode()
255
+
256
+ return git_branch, git_version
@@ -0,0 +1,96 @@
1
+ import logging
2
+ import os
3
+
4
+ # default specification paths
5
+ import pkg_resources
6
+ import psutil
7
+
8
+ SPECS_PATH_SETUPS_DEFAULT_PATH = pkg_resources.resource_filename(
9
+ "redis_benchmarks_specification", "setups"
10
+ )
11
+
12
+ SPECS_PATH_TEST_SUITES_DEFAULT_PATH = pkg_resources.resource_filename(
13
+ "redis_benchmarks_specification", "test-suites"
14
+ )
15
+
16
+ SPECS_PATH_SETUPS = os.getenv("SPECS_PATH_SETUPS", SPECS_PATH_SETUPS_DEFAULT_PATH)
17
+ SPECS_PATH_TEST_SUITES = os.getenv(
18
+ "SPECS_PATH_TEST_SUITES", SPECS_PATH_TEST_SUITES_DEFAULT_PATH
19
+ )
20
+
21
+ # event stream from github
22
+ STREAM_KEYNAME_GH_EVENTS_COMMIT = os.getenv(
23
+ "STREAM_KEYNAME_GH_EVENTS_COMMIT", "oss:api:gh/redis/redis/commits"
24
+ )
25
+
26
+ STREAM_GH_EVENTS_COMMIT_BUILDERS_CG = os.getenv(
27
+ "STREAM_GH_EVENTS_COMMIT_BUILDERS_CG", "builders-cg:redis/redis/commits"
28
+ )
29
+
30
+ # build events stream. This is the stream read by the coordinators to kickoff benchmark variations
31
+ STREAM_KEYNAME_NEW_BUILD_EVENTS = os.getenv(
32
+ "STREAM_KEYNAME_NEW_BUILD_EVENTS", "oss:api:gh/redis/redis/builds"
33
+ )
34
+
35
+
36
+ # Function to get architecture-specific build events stream name
37
+ def get_arch_specific_stream_name(arch):
38
+ """Get architecture-specific stream name for build events"""
39
+ base_stream = STREAM_KEYNAME_NEW_BUILD_EVENTS
40
+ if arch in ["amd64", "x86_64"]:
41
+ return f"{base_stream}:amd64"
42
+ elif arch in ["arm64", "aarch64"]:
43
+ return f"{base_stream}:arm64"
44
+ else:
45
+ # Fallback to base stream for unknown architectures
46
+ return base_stream
47
+
48
+
49
+ STREAM_GH_NEW_BUILD_RUNNERS_CG = os.getenv(
50
+ "STREAM_GH_NEW_BUILD_RUNNERS_CG", "runners-cg:redis/redis/commits"
51
+ )
52
+
53
+ # host used to store the streams of events
54
+ GH_TOKEN = os.getenv("GH_TOKEN", None)
55
+ GH_REDIS_SERVER_HOST = os.getenv("GH_REDIS_SERVER_HOST", "localhost")
56
+ GH_REDIS_SERVER_PORT = int(os.getenv("GH_REDIS_SERVER_PORT", "6379"))
57
+ GH_REDIS_SERVER_AUTH = os.getenv("GH_REDIS_SERVER_AUTH", None)
58
+ GH_REDIS_SERVER_USER = os.getenv("GH_REDIS_SERVER_USER", None)
59
+
60
+ # DB used to authenticate ( read-only/non-dangerous access only )
61
+ REDIS_AUTH_SERVER_HOST = os.getenv("REDIS_AUTH_SERVER_HOST", "localhost")
62
+ REDIS_AUTH_SERVER_PORT = int(os.getenv("REDIS_AUTH_SERVER_PORT", "6379"))
63
+ REDIS_HEALTH_CHECK_INTERVAL = int(os.getenv("REDIS_HEALTH_CHECK_INTERVAL", "15"))
64
+ REDIS_SOCKET_TIMEOUT = int(os.getenv("REDIS_SOCKET_TIMEOUT", "300"))
65
+ REDIS_BINS_EXPIRE_SECS = int(
66
+ os.getenv("REDIS_BINS_EXPIRE_SECS", "{}".format(24 * 7 * 60 * 60))
67
+ )
68
+
69
+ # environment variables
70
+ PULL_REQUEST_TRIGGER_LABEL = os.getenv(
71
+ "PULL_REQUEST_TRIGGER_LABEL", "action:run-benchmark"
72
+ )
73
+ DATASINK_RTS_PUSH = bool(os.getenv("DATASINK_PUSH_RTS", False))
74
+ DATASINK_RTS_AUTH = os.getenv("DATASINK_RTS_AUTH", None)
75
+ DATASINK_RTS_USER = os.getenv("DATASINK_RTS_USER", None)
76
+ DATASINK_RTS_HOST = os.getenv("DATASINK_RTS_HOST", "localhost")
77
+ DATASINK_RTS_PORT = int(os.getenv("DATASINK_RTS_PORT", "6379"))
78
+ ALLOWED_PROFILERS = "perf:record,vtune"
79
+ PROFILERS_DEFAULT = "perf:record"
80
+ PROFILE_FREQ_DEFAULT = "99"
81
+ PROFILERS_DSO = os.getenv("PROFILERS_DSO", None)
82
+ PROFILERS_ENABLED = bool(int(os.getenv("PROFILE", 0)))
83
+ PROFILERS = os.getenv("PROFILERS", PROFILERS_DEFAULT)
84
+ MAX_PROFILERS_PER_TYPE = int(os.getenv("MAX_PROFILERS", 1))
85
+ PROFILE_FREQ = os.getenv("PROFILE_FREQ", PROFILE_FREQ_DEFAULT)
86
+ S3_BUCKET_NAME = os.getenv("S3_BUCKET_NAME", "redis.benchmarks.spec")
87
+ # logging related
88
+ VERBOSE = os.getenv("VERBOSE", "1") == "0"
89
+ LOG_FORMAT = "%(asctime)s %(levelname)-4s %(message)s"
90
+ LOG_DATEFMT = "%Y-%m-%d %H:%M:%S"
91
+ LOG_LEVEL = logging.INFO
92
+ if VERBOSE:
93
+ LOG_LEVEL = logging.WARN
94
+
95
+ MACHINE_CPU_COUNT = psutil.cpu_count()
96
+ MACHINE_NAME = os.uname()[1]
@@ -0,0 +1,280 @@
1
+ import logging
2
+ from github import Github
3
+
4
+
5
+ def check_regression_comment(comments):
6
+ res = False
7
+ pos = -1
8
+ for n, comment in enumerate(comments):
9
+ body = comment.body
10
+ if "Comparison between" in body and "Time Period from" in body:
11
+ res = True
12
+ pos = n
13
+ return res, pos
14
+
15
+
16
+ def generate_build_started_pr_comment(
17
+ build_datetime,
18
+ commit_datetime,
19
+ commit_summary,
20
+ git_branch,
21
+ git_hash,
22
+ tests_groups_regexp,
23
+ tests_priority_lower_limit,
24
+ tests_priority_upper_limit,
25
+ tests_regexp,
26
+ ):
27
+ comment_body = "### CE Performance Automation : step 1 of 2 (build) STARTING...\n\n"
28
+ comment_body += (
29
+ "This comment was automatically generated given a benchmark was triggered.\n"
30
+ )
31
+ comment_body += f"Started building at {build_datetime}\n"
32
+ comment_body += "You can check each build/benchmark progress in grafana:\n"
33
+ if not isinstance(git_hash, str):
34
+ git_hash = git_hash.decode()
35
+ comment_body += f" - git hash: {git_hash}\n"
36
+ comment_body += f" - git branch: {git_branch}\n"
37
+ comment_body += f" - commit date and time: {commit_datetime}\n"
38
+ comment_body += f" - commit summary: {commit_summary}\n"
39
+ comment_body += " - test filters:\n"
40
+ comment_body += (
41
+ f" - command priority lower limit: {tests_priority_lower_limit}\n"
42
+ )
43
+ comment_body += (
44
+ f" - command priority upper limit: {tests_priority_upper_limit}\n"
45
+ )
46
+ comment_body += f" - test name regex: {tests_regexp}\n"
47
+ comment_body += f" - command group regex: {tests_groups_regexp}\n\n"
48
+ return comment_body
49
+
50
+
51
+ def generate_build_finished_pr_comment(
52
+ benchmark_stream_ids,
53
+ commit_datetime,
54
+ commit_summary,
55
+ git_branch,
56
+ git_hash,
57
+ tests_groups_regexp,
58
+ tests_priority_lower_limit,
59
+ tests_priority_upper_limit,
60
+ tests_regexp,
61
+ build_start_datetime,
62
+ build_duration_seconds,
63
+ ):
64
+ build_duration_seconds = int(build_duration_seconds)
65
+ comment_body = "### CE Performance Automation : step 1 of 2 (build) DONE.\n\n"
66
+ comment_body += (
67
+ "This comment was automatically generated given a benchmark was triggered.\n"
68
+ )
69
+ comment_body += f"Started building at {build_start_datetime} and took {build_duration_seconds} seconds.\n"
70
+ comment_body += "You can check each build/benchmark progress in grafana:\n"
71
+ if not isinstance(git_hash, str):
72
+ git_hash = git_hash.decode()
73
+ comment_body += f" - git hash: {git_hash}\n"
74
+ comment_body += f" - git branch: {git_branch}\n"
75
+ comment_body += f" - commit date and time: {commit_datetime}\n"
76
+ comment_body += f" - commit summary: {commit_summary}\n"
77
+ comment_body += " - test filters:\n"
78
+ comment_body += (
79
+ f" - command priority lower limit: {tests_priority_lower_limit}\n"
80
+ )
81
+ comment_body += (
82
+ f" - command priority upper limit: {tests_priority_upper_limit}\n"
83
+ )
84
+ comment_body += f" - test name regex: {tests_regexp}\n"
85
+ comment_body += f" - command group regex: {tests_groups_regexp}\n\n"
86
+ for benchmark_stream_id in benchmark_stream_ids:
87
+ if not isinstance(benchmark_stream_id, str):
88
+ benchmark_stream_id = benchmark_stream_id.decode()
89
+ grafana_benchmark_status_link = f"https://benchmarksredisio.grafana.net/d/edsxdsrbexhc0f/ce-benchmark-run-status?orgId=1&var-benchmark_work_stream={benchmark_stream_id}"
90
+ print("=============================================================")
91
+ print(f"Check benchmark run status in: {grafana_benchmark_status_link}")
92
+ comment_body += f"You can check a comparison in detail via the [grafana link]({grafana_benchmark_status_link})"
93
+ return comment_body
94
+
95
+
96
+ def check_github_available_and_actionable(
97
+ fn, github_token, pull_request, tf_github_org, tf_github_repo, verbose
98
+ ):
99
+ # using an access token
100
+ is_actionable_pr = False
101
+ contains_regression_comment = False
102
+ regression_comment = None
103
+ github_pr = None
104
+ old_regression_comment_body = ""
105
+ pr_link = None
106
+ if github_token is not None:
107
+ logging.info("Detected github token")
108
+ g = Github(github_token)
109
+ if pull_request is not None and pull_request != "":
110
+ try:
111
+ pull_request_n = int(pull_request)
112
+ github_pr = (
113
+ g.get_user(tf_github_org)
114
+ .get_repo(tf_github_repo)
115
+ .get_issue(pull_request_n)
116
+ )
117
+ comments = github_pr.get_comments()
118
+ pr_link = github_pr.html_url
119
+ logging.info("Working on github PR already: {}".format(pr_link))
120
+ is_actionable_pr = True
121
+ contains_regression_comment, pos = fn(comments)
122
+ if contains_regression_comment:
123
+ regression_comment = comments[pos]
124
+ old_regression_comment_body = regression_comment.body
125
+ logging.info(
126
+ "Already contains PR comment. Link: {}".format(
127
+ regression_comment.html_url
128
+ )
129
+ )
130
+ if verbose:
131
+ logging.info("Printing old PR comment:")
132
+ print("".join(["-" for x in range(1, 80)]))
133
+ print(regression_comment.body)
134
+ print("".join(["-" for x in range(1, 80)]))
135
+ else:
136
+ logging.info("Does not contain PR comment")
137
+ except Exception as e:
138
+ logging.error(
139
+ f"an error occured when checking github info. {e.__str__()}. proceeding..."
140
+ )
141
+ logging.info(
142
+ f"contains_regression_comment: {contains_regression_comment}, is_actionable_pr: {is_actionable_pr}, pr_link: {pr_link}"
143
+ )
144
+
145
+ return (
146
+ contains_regression_comment,
147
+ github_pr,
148
+ is_actionable_pr,
149
+ old_regression_comment_body,
150
+ pr_link,
151
+ regression_comment,
152
+ )
153
+
154
+
155
+ def create_new_pr_comment(auto_approve, comment_body, github_pr, pr_link):
156
+ regression_comment = None
157
+ user_input = "n"
158
+ if auto_approve:
159
+ print("auto approving...")
160
+ else:
161
+ user_input = input("Do you wish to add a comment in {} (y/n): ".format(pr_link))
162
+ if user_input.lower() == "y" or auto_approve:
163
+ print("creating an comment in PR {}".format(pr_link))
164
+ regression_comment = github_pr.create_comment(comment_body)
165
+ html_url = regression_comment.html_url
166
+ print("created comment. Access it via {}".format(html_url))
167
+ return regression_comment
168
+
169
+
170
+ def update_comment_if_needed(
171
+ auto_approve, comment_body, old_regression_comment_body, regression_comment, verbose
172
+ ):
173
+ same_comment = False
174
+ user_input = "n"
175
+ if comment_body == old_regression_comment_body:
176
+ logging.info(
177
+ "The old github comment is the same as the new comment. skipping..."
178
+ )
179
+ same_comment = True
180
+ else:
181
+ logging.info(
182
+ "The old github comment is different from the new comment. updating it..."
183
+ )
184
+ comment_body_arr = comment_body.split("\n")
185
+ old_regression_comment_body_arr = old_regression_comment_body.split("\n")
186
+ if verbose:
187
+ DF = [
188
+ x for x in comment_body_arr if x not in old_regression_comment_body_arr
189
+ ]
190
+ print("---------------------")
191
+ print(DF)
192
+ print("---------------------")
193
+ if same_comment is False:
194
+ if auto_approve:
195
+ print("auto approving...")
196
+ else:
197
+ user_input = input(
198
+ "Do you wish to update the comment {} (y/n): ".format(
199
+ regression_comment.html_url
200
+ )
201
+ )
202
+ if user_input.lower() == "y" or auto_approve:
203
+ html_url = regression_comment.html_url
204
+ print("Updating comment {}".format(html_url))
205
+ regression_comment.edit(comment_body)
206
+ print("Updated comment. Access it via {}".format(html_url))
207
+
208
+
209
+ def check_benchmark_build_comment(comments):
210
+ res = False
211
+ pos = -1
212
+ for n, comment in enumerate(comments):
213
+ body = comment.body
214
+ if "CE Performance Automation : step" in body:
215
+ res = True
216
+ pos = n
217
+ return res, pos
218
+
219
+
220
+ def check_benchmark_running_comment(comments):
221
+ res = False
222
+ pos = -1
223
+ for n, comment in enumerate(comments):
224
+ body = comment.body
225
+ if "CE Performance Automation : step" in body:
226
+ res = True
227
+ pos = n
228
+ return res, pos
229
+
230
+
231
+ def markdown_progress_bar(current, total, bar_length=40):
232
+ progress = 1.0
233
+ if total > 0:
234
+ progress = current / total
235
+ block = int(round(bar_length * progress))
236
+ bar = "#" * block + "-" * (bar_length - block)
237
+ percentage = round(progress * 100, 2)
238
+ return f"[{bar}] {percentage}%"
239
+
240
+
241
+ def generate_benchmark_started_pr_comment(
242
+ benchmark_stream_id,
243
+ total_pending,
244
+ total_benchmarks,
245
+ total_failed,
246
+ benchmark_suite_start_datetime,
247
+ benchmark_suite_duration_secs,
248
+ ):
249
+ comment_body = "### CE Performance Automation : step 2 of 2 (benchmark) "
250
+ if total_pending > 0:
251
+ comment_body += "RUNNING...\n\n"
252
+ else:
253
+ comment_body += "FINISHED.\n\n"
254
+
255
+ comment_body += (
256
+ "This comment was automatically generated given a benchmark was triggered.\n\n"
257
+ )
258
+
259
+ comment_body += f"Started benchmark suite at {benchmark_suite_start_datetime} and took {benchmark_suite_duration_secs} seconds "
260
+ if total_pending > 0:
261
+ comment_body += "up until now.\n"
262
+ else:
263
+ comment_body += "to finish.\n"
264
+
265
+ completed = total_benchmarks - total_pending
266
+ successful = completed - total_failed
267
+ comment_body += (
268
+ f"Status: {markdown_progress_bar(completed,total_benchmarks,80)} completed.\n\n"
269
+ )
270
+ comment_body += f"In total will run {total_benchmarks} benchmarks.\n"
271
+ comment_body += f" - {total_pending} pending.\n"
272
+ comment_body += f" - {completed} completed:\n"
273
+ comment_body += f" - {successful} successful.\n"
274
+ comment_body += f" - {total_failed} failed.\n"
275
+
276
+ if not isinstance(benchmark_stream_id, str):
277
+ benchmark_stream_id = benchmark_stream_id.decode()
278
+ grafana_benchmark_status_link = f"https://benchmarksredisio.grafana.net/d/edsxdsrbexhc0f/ce-benchmark-run-status?orgId=1&var-benchmark_work_stream={benchmark_stream_id}"
279
+ comment_body += f"You can check a the status in detail via the [grafana link]({grafana_benchmark_status_link})"
280
+ return comment_body
@@ -0,0 +1,28 @@
1
+ from redis_benchmarks_specification import __version__
2
+
3
+ import os
4
+ import toml
5
+
6
+ PACKAGE_DIR = os.path.dirname(os.path.abspath(__file__))
7
+
8
+
9
+ def populate_with_poetry_data():
10
+ project_name = "redis-benchmarks-specification"
11
+ project_version = __version__
12
+ project_description = None
13
+ try:
14
+ poetry_data = toml.load("pyproject.toml")["tool"]["poetry"]
15
+ project_name = poetry_data["name"]
16
+ project_version = poetry_data["version"]
17
+ project_description = poetry_data["description"]
18
+ except FileNotFoundError:
19
+ pass
20
+
21
+ return project_name, project_description, project_version
22
+
23
+
24
+ def get_version_string(project_name, project_version):
25
+ version_str = "{project_name} {project_version}".format(
26
+ project_name=project_name, project_version=project_version
27
+ )
28
+ return version_str