forked from dongyoungy/dbsherlock-reproducibility
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreproduce_cui.m
52 lines (49 loc) · 2.72 KB
/
reproduce_cui.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
function reproduce_cui()
% Add scripts directory to path
current_dir = pwd;
addpath(fullfile(current_dir, 'scripts'));
while true
fprintf('\n << DBSherlock Experiments >>\n');
fprintf(' 1. Accuracy of Single Causal Models (Section 8.3)\n');
fprintf(' 2. DBSherlock Predicates versus PerfXplain (Section 8.4)\n');
fprintf(' 3. Effectiveness of Merged Causal Models (Section 8.5)\n');
fprintf(' 4. Effect of Incorporating Domain Knowledge (Section 8.6)\n');
fprintf(' 5. Explaining Compound Situations (Section 8.7)\n');
fprintf(' 6. Run all of the above (ETC: 4-5 hours)\n');
fprintf(' 7. LLM-Enhanced Analysis (New)\n');
fprintf(' 8. Run all including LLM analysis (ETC: 5-6 hours)\n\n');
choice = input('Select an experiment to reproduce (1-8 or other input to exit): ');
switch choice
case 1
perform_evaluation_single_causal_models();
case 2
perform_evaluation_perfxplain();
case 3
perform_evaluation_merged_causal_models();
case 4
perform_evaluation_domain_knowledge();
case 5
perform_evaluation_compound_situations();
case 6
run_all_original_experiments();
case 7
fprintf('\nRunning LLM-Enhanced Analysis...\n');
[conf_llm, fscore_llm] = perform_evaluation_llm_enhanced('dbsherlock_dataset_tpcc_16w.mat');
case_names = {'Poorly Written Query', 'Poor Physical Design', 'Workload Spike', ...
'I/O Saturation', 'DB Backup', 'Table Restore', 'CPU Saturation', ...
'Flush Log/Table', 'Network Congestion', 'Lock Contention'};
plot_comprehensive_analysis(conf_llm, fscore_llm, case_names);
case 8
fprintf('\nRunning all experiments including LLM analysis...\n');
run_all_original_experiments();
[conf_llm, fscore_llm] = perform_evaluation_llm_enhanced('dbsherlock_dataset_tpcc_16w.mat');
case_names = {'Poorly Written Query', 'Poor Physical Design', 'Workload Spike', ...
'I/O Saturation', 'DB Backup', 'Table Restore', 'CPU Saturation', ...
'Flush Log/Table', 'Network Congestion', 'Lock Contention'};
plot_comprehensive_analysis(conf_llm, fscore_llm, case_names);
otherwise
fprintf('Exiting...\n');
return;
end
end
end