@@ -68,6 +68,7 @@ def test_export_redis_metrics():
68
68
69
69
time_ms , _ , overall_end_time_metrics = collect_redis_metrics ([rts ])
70
70
artifact_version = "6.2.3"
71
+ tf_github_branch = "master"
71
72
datapoint_errors , datapoint_inserts = export_redis_metrics (
72
73
artifact_version ,
73
74
time_ms ,
@@ -92,9 +93,64 @@ def test_export_redis_metrics():
92
93
assert labels_rts_cmdstats ["metric-type" ] == "test-tag"
93
94
assert labels_rts_cmdstats ["command" ] == "ping"
94
95
assert labels_rts_cmdstats ["command_and_setup" ] == "ping - setup_name"
96
+ assert (
97
+ labels_rts_cmdstats ["command_and_metric_and_setup" ]
98
+ == "ping - calls - setup_name"
99
+ )
100
+ assert (
101
+ labels_rts_cmdstats ["command_and_metric_and_setup_and_version" ]
102
+ == "ping - calls - setup_name - 6.2.3"
103
+ )
104
+ assert labels_rts_cmdstats ["metric" ] == "calls"
105
+ assert labels_rts_cmdstats ["shard" ] == "1"
106
+ assert labels_rts_cmdstats ["metric_and_shard" ] == "calls"
107
+
108
+ labels_rts_cmdstats = (
109
+ rts .ts ()
110
+ .info (
111
+ "ci.benchmarks.redislabs/env/org/repo/test1/by.version/6.2.3/benchmark_end/setup_name/commandstats_cmdstat_ping_calls"
112
+ )
113
+ .labels
114
+ )
115
+ assert labels_rts_cmdstats ["metric-type" ] == "test-tag"
116
+ assert labels_rts_cmdstats ["command" ] == "ping"
117
+ assert labels_rts_cmdstats ["command_and_setup" ] == "ping - setup_name"
118
+ assert (
119
+ labels_rts_cmdstats ["command_and_metric_and_setup" ]
120
+ == "ping - calls - setup_name"
121
+ )
122
+ assert (
123
+ labels_rts_cmdstats ["command_and_metric_and_setup_and_version" ]
124
+ == "ping - calls - setup_name - 6.2.3"
125
+ )
126
+ assert labels_rts_cmdstats ["metric" ] == "calls"
127
+ assert labels_rts_cmdstats ["shard" ] == "1"
128
+ assert labels_rts_cmdstats ["metric_and_shard" ] == "calls"
129
+
130
+ # by branch
131
+ labels_rts_cmdstats = (
132
+ rts .ts ()
133
+ .info (
134
+ "ci.benchmarks.redislabs/env/org/repo/test1/by.branch/master/benchmark_end/setup_name/commandstats_cmdstat_ping_calls"
135
+ )
136
+ .labels
137
+ )
138
+ assert labels_rts_cmdstats ["metric-type" ] == "test-tag"
139
+ assert labels_rts_cmdstats ["command" ] == "ping"
140
+ assert labels_rts_cmdstats ["command_and_setup" ] == "ping - setup_name"
141
+ assert (
142
+ labels_rts_cmdstats ["command_and_metric_and_setup" ]
143
+ == "ping - calls - setup_name"
144
+ )
145
+ assert (
146
+ labels_rts_cmdstats ["command_and_metric_and_setup_and_branch" ]
147
+ == "ping - calls - setup_name - master"
148
+ )
95
149
assert labels_rts_cmdstats ["metric" ] == "calls"
96
150
assert labels_rts_cmdstats ["shard" ] == "1"
97
151
assert labels_rts_cmdstats ["metric_and_shard" ] == "calls"
152
+
153
+ #
98
154
assert "ci.benchmarks.redislabs/env/org/repo/test1/by.version/6.2.3/benchmark_end/setup_name/commandstats_cmdstat_ping_calls" in rts .ts ().queryindex (
99
155
["metric-type=test-tag" ]
100
156
)
@@ -118,7 +174,7 @@ def test_export_redis_metrics():
118
174
assert labels_rts_latencystats ["shard" ] == "1"
119
175
assert labels_rts_latencystats ["metric_and_shard" ] == "p50"
120
176
assert datapoint_errors == 0
121
- assert datapoint_inserts == (1 * len (list (overall_end_time_metrics .keys ())))
177
+ assert datapoint_inserts == (2 * len (list (overall_end_time_metrics .keys ())))
122
178
tf_github_branch = "master"
123
179
datapoint_errors , datapoint_inserts = export_redis_metrics (
124
180
artifact_version ,
0 commit comments