Skip to content

Commit e625cd0

Browse files
authored
Merge pull request #3298 from dolthub/test/retire-wide-fetch-hotspots
Retire two wide-fetch hotspots to nightly regression seeds
2 parents c836c6b + dc8302b commit e625cd0

4 files changed

Lines changed: 69 additions & 14 deletions

File tree

test/performance-hotspot-corpus/issue_3251.json renamed to test/performance-hotspot-seeds/issue_3251.json

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,32 @@
3838
"fingerprint": "0a60021380f251f8dc7d69fc",
3939
"family": "9dba6267f4d215e47221145d",
4040
"issue": 3251,
41-
"category": "wide_fetches"
41+
"category": "wide_fetches",
42+
"discovery": {
43+
"source_commit": "1066294abad4c33a71ee6ba6615a6460fa32fec9",
44+
"median_ratio": 3.9541806448308536,
45+
"minimum_ratio": 3.922268107218506,
46+
"pairs": [
47+
{
48+
"doltlite_ms": 772.034,
49+
"sqlite_ms": 195.245
50+
},
51+
{
52+
"doltlite_ms": 772.173,
53+
"sqlite_ms": 196.869
54+
},
55+
{
56+
"doltlite_ms": 776.307,
57+
"sqlite_ms": 194.524
58+
},
59+
{
60+
"doltlite_ms": 773.528,
61+
"sqlite_ms": 195.892
62+
},
63+
{
64+
"doltlite_ms": 773.62,
65+
"sqlite_ms": 194.39
66+
}
67+
]
68+
}
4269
}

test/performance-hotspot-corpus/issue_3252.json renamed to test/performance-hotspot-seeds/issue_3252.json

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,32 @@
3838
"fingerprint": "d7719c8ea14f6955fbf79c63",
3939
"family": "695846a28e78b94f29e8a5ae",
4040
"issue": 3252,
41-
"category": "wide_fetches"
41+
"category": "wide_fetches",
42+
"discovery": {
43+
"source_commit": "1066294abad4c33a71ee6ba6615a6460fa32fec9",
44+
"median_ratio": 3.339452294215503,
45+
"minimum_ratio": 3.3283229433667714,
46+
"pairs": [
47+
{
48+
"doltlite_ms": 631.07,
49+
"sqlite_ms": 189.606
50+
},
51+
{
52+
"doltlite_ms": 634.425,
53+
"sqlite_ms": 188.976
54+
},
55+
{
56+
"doltlite_ms": 634.349,
57+
"sqlite_ms": 189.956
58+
},
59+
{
60+
"doltlite_ms": 636.29,
61+
"sqlite_ms": 189.723
62+
},
63+
{
64+
"doltlite_ms": 628.064,
65+
"sqlite_ms": 188.41
66+
}
67+
]
68+
}
4269
}

‎test/performance_hotspot_seeds_test.py‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ def test_index_cache_warmup_precedes_transaction_and_timer(self):
7070

7171
def test_retired_corpus_moves_to_search_and_random_exploration_continues(self):
7272
specs = list(seeds.specs())
73-
self.assertEqual(len(specs), 16)
74-
self.assertEqual(sum(len(cases) for _, cases, _ in specs), 35)
73+
self.assertEqual(len(specs), 17)
74+
self.assertEqual(sum(len(cases) for _, cases, _ in specs), 37)
7575
names = {path.stem for path in seeds.SEED_DIR.glob('*.json')}
7676
wide_cases = {'create_index', 'delete_batch', 'distinct', 'index_fetch',
7777
'join_pk', 'point_payload', 'point_pk', 'range_pk',
@@ -87,6 +87,7 @@ def test_retired_corpus_moves_to_search_and_random_exploration_continues(self):
8787
'scan_after_update_wide_text_pk',
8888
'issue_3249', 'issue_3250',
8989
'issue_3263', 'issue_3264', 'issue_3266',
90+
'issue_3251', 'issue_3252',
9091
'bulk_deletes_delete_plain'})
9192
wide = [(p, cases, setup) for p, cases, setup in specs if p.payload==16384]
9293
self.assertEqual(len(wide), 1)
@@ -108,7 +109,7 @@ def test_retired_corpus_moves_to_search_and_random_exploration_continues(self):
108109
for index, spec in enumerate(specs):
109110
self.assertEqual(next(generated), (index, *spec, 'retired'))
110111
index, profile, cases, setup, origin = next(generated)
111-
self.assertEqual(index, 16)
112+
self.assertEqual(index, 17)
112113
self.assertEqual(len(cases), 4)
113114
self.assertEqual({case.recipe['operator'] for case in cases}, {'update_blob'})
114115
self.assertIn('CREATE TABLE u', setup)

‎test/performance_hotspots_test.py‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def test_sql_failure_is_not_a_timing(self):
112112
hotspots.run(["sh", "-c", "echo 'error' >&2"])
113113

114114
def test_main_measures_only_remaining_workloads_for_all_arms(self):
115-
self.assertEqual(len(list((hotspots.TEST_DIR/'performance-hotspot-corpus').glob('*.json'))), 7)
115+
self.assertEqual(len(list((hotspots.TEST_DIR/'performance-hotspot-corpus').glob('*.json'))), 5)
116116

117117
with tempfile.TemporaryDirectory() as directory:
118118
result = Path(directory) / "results.tsv"
@@ -159,10 +159,10 @@ def test_main_measures_only_remaining_workloads_for_all_arms(self):
159159
self.assertIn("Add Column With Default", report.getvalue())
160160
self.assertEqual(report.getvalue().count("### "), 4)
161161
self.assertNotIn("### Integer Keys", report.getvalue())
162-
self.assertTrue(all(len(call.args[2]) == 7 for call in measure_retained.call_args_list))
163-
self.assertEqual(len(result.read_text().splitlines()), 8)
162+
self.assertTrue(all(len(call.args[2]) == 5 for call in measure_retained.call_args_list))
163+
self.assertEqual(len(result.read_text().splitlines()), 6)
164164
self.assertIn('add_column\tadd_column_default\t100000\t100000\n', result.read_text())
165-
self.assertEqual(len(raw.read_text().splitlines()), 17)
165+
self.assertEqual(len(raw.read_text().splitlines()), 13)
166166

167167
def test_medians_raw_samples_and_stock_report(self):
168168
with tempfile.TemporaryDirectory() as directory:
@@ -254,7 +254,7 @@ def test_retired_corpus_categories_and_shared_fixtures(self):
254254
Path(directory), hotspots.TEST_DIR/'performance-hotspot-seeds')
255255
counts = {category: 0 for category in ('wide_rows', 'narrow_rows', 'zero_row_updates',
256256
'in_transaction_mutations', 'integer_keys',
257-
'bulk_deletes', 'small_cache')}
257+
'bulk_deletes', 'small_cache', 'wide_fetches')}
258258
for name, bundle, databases in fixtures:
259259
category = hotspots.section_of(name)
260260
counts[category] += 1
@@ -274,13 +274,13 @@ def test_retired_corpus_categories_and_shared_fixtures(self):
274274
self.assertTrue(bundle['expected'].startswith('0|'))
275275
self.assertEqual(counts, {'wide_rows': 12, 'narrow_rows': 5, 'zero_row_updates': 2,
276276
'in_transaction_mutations': 4, 'integer_keys': 2,
277-
'bulk_deletes': 1, 'small_cache': 3})
278-
self.assertEqual(sql.call_count, 30)
277+
'bulk_deletes': 1, 'small_cache': 3, 'wide_fetches': 2})
278+
self.assertEqual(sql.call_count, 33)
279279
grouped = {}
280280
for name, bundle, databases in fixtures:
281281
previous = grouped.setdefault(bundle['setup_sql'], databases)
282282
self.assertEqual(databases, previous)
283-
self.assertEqual(len(grouped), 13)
283+
self.assertEqual(len(grouped), 14)
284284

285285
def test_retained_gate_measures_fixed_batches(self):
286286
bundle = json.loads((hotspots.TEST_DIR/'performance-hotspot-seeds/narrow_rows_point_pk.json').read_text())
@@ -335,7 +335,7 @@ def test_discovered_sections_are_reported_and_gated(self):
335335

336336
def test_remaining_issue_themes_are_reported_and_gated(self):
337337
expected = {
338-
'wide_fetches': {3251, 3252, 3253},
338+
'wide_fetches': {3253},
339339
'small_cache': {3265},
340340
'after_deletes': {3258, 3270, 3271},
341341
}

0 commit comments

Comments
 (0)