Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds new regression patches for new Synth IP case studies #10

Merged
merged 16 commits into from
Oct 6, 2023
Merged
3 changes: 3 additions & 0 deletions SynthDADynamicDispatch/regression_1.info
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ include_revisions:
path: regression_1.patch
project_name: FeaturePerfCSCollection
shortname: regress_sorting
tags:
- regression
- perf_prec
11 changes: 11 additions & 0 deletions SynthDADynamicDispatch/regression_2.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: "Patch that adds a regression that only affects hash-based searchers"
include_revisions:
revision_range:
start: 04de0642afe35a42931e03c670b588e8f294dcfc
end: master
path: regression_1.patch
project_name: FeaturePerfCSCollection
shortname: regress_hashing
tags:
- regression
- perf_prec
13 changes: 13 additions & 0 deletions SynthDADynamicDispatch/regression_2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/projects/SynthDADynamicDispatch/main.cpp b/projects/SynthDADynamicDispatch/main.cpp
index 90d60c3..d3d601a 100644
--- a/projects/SynthDADynamicDispatch/main.cpp
+++ b/projects/SynthDADynamicDispatch/main.cpp
@@ -99,7 +99,7 @@ public:
std::unordered_map<int, int> Map;

for (int i = 0; i < Data.size(); i++) {
- fp_util::sleep_for_millisecs(100);
+ fp_util::sleep_for_millisecs(200);
if (auto Entry = Map.find(TargetSum - Data[i]); Entry != Map.end()) {
return {std::tuple<uint32_t, uint32_t>{Data[Entry->second], Data[i]}};
}
11 changes: 11 additions & 0 deletions SynthDADynamicDispatch/regression_3.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: "Patch that adds a regression that only affects brut-force searchers"
include_revisions:
revision_range:
start: 04de0642afe35a42931e03c670b588e8f294dcfc
end: master
path: regression_3.patch
project_name: FeaturePerfCSCollection
shortname: regress_brut_force
tags:
- regression
- perf_prec
13 changes: 13 additions & 0 deletions SynthDADynamicDispatch/regression_3.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/projects/SynthDADynamicDispatch/main.cpp b/projects/SynthDADynamicDispatch/main.cpp
index 90d60c3..9284fe9 100644
--- a/projects/SynthDADynamicDispatch/main.cpp
+++ b/projects/SynthDADynamicDispatch/main.cpp
@@ -43,7 +43,7 @@ public:

for (int i = 0; i < Data.size() - 1; i++) {
for (int j = i + 1; j < Data.size(); j++) {
- fp_util::sleep_for_millisecs(100);
+ fp_util::sleep_for_millisecs(200);
if (Data[i] + Data[j] == TargetSum) {
return {std::tuple<uint32_t, uint32_t>{Data[i], Data[j]}};
}
11 changes: 11 additions & 0 deletions SynthDADynamicDispatch/regression_4.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: "Patch that adds a regression that affects brut-force and hash-based searchers"
include_revisions:
revision_range:
start: 04de0642afe35a42931e03c670b588e8f294dcfc
end: master
path: regression_4.patch
project_name: FeaturePerfCSCollection
shortname: regress_brut_force_and_hash
tags:
- regression
- perf_prec
22 changes: 22 additions & 0 deletions SynthDADynamicDispatch/regression_4.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/projects/SynthDADynamicDispatch/main.cpp b/projects/SynthDADynamicDispatch/main.cpp
index 90d60c3..2aad890 100644
--- a/projects/SynthDADynamicDispatch/main.cpp
+++ b/projects/SynthDADynamicDispatch/main.cpp
@@ -43,7 +43,7 @@ public:

for (int i = 0; i < Data.size() - 1; i++) {
for (int j = i + 1; j < Data.size(); j++) {
- fp_util::sleep_for_millisecs(100);
+ fp_util::sleep_for_millisecs(200);
if (Data[i] + Data[j] == TargetSum) {
return {std::tuple<uint32_t, uint32_t>{Data[i], Data[j]}};
}
@@ -99,7 +99,7 @@ public:
std::unordered_map<int, int> Map;

for (int i = 0; i < Data.size(); i++) {
- fp_util::sleep_for_millisecs(100);
+ fp_util::sleep_for_millisecs(200);
if (auto Entry = Map.find(TargetSum - Data[i]); Entry != Map.end()) {
return {std::tuple<uint32_t, uint32_t>{Data[Entry->second], Data[i]}};
}
3 changes: 3 additions & 0 deletions SynthDARecursion/regression_1.info
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ include_revisions:
path: regression_1.patch
project_name: FeaturePerfCSCollection
shortname: regress_rec_limit
tags:
- regression
- perf_prec
11 changes: 11 additions & 0 deletions SynthDARecursion/regression_2.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: "Patch that adds a regression that only affects reverse"
include_revisions:
revision_range:
start: daf81de0738cb861b800c4dae1a805e8dabaa544
end: master
path: regression_2.patch
project_name: FeaturePerfCSCollection
shortname: regress_reverse
tags:
- regression
- perf_prec
12 changes: 12 additions & 0 deletions SynthDARecursion/regression_2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/projects/SynthDARecursion/main.cpp b/projects/SynthDARecursion/main.cpp
index 39a1e7c..1397c17 100644
--- a/projects/SynthDARecursion/main.cpp
+++ b/projects/SynthDARecursion/main.cpp
@@ -66,6 +66,7 @@ int main(int argc, char *argv[]) {
RecLimit = fp_util::getFeatureValue(argc, argv, "--limit", 4096);

if (Reverse) {
+ fp_util::busy_sleep_for_millisecs(400);
std::reverse(InputString.begin(), InputString.end());
}

3 changes: 3 additions & 0 deletions SynthFeatureInteraction/regression_1.info
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ include_revisions:
path: regression_1.patch
project_name: FeaturePerfCSCollection
shortname: regress_f1_f2_f3
tags:
- regression
- perf_prec
11 changes: 11 additions & 0 deletions SynthFeatureInteraction/regression_2.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: "Patch that adds a regression that only affects configs with F1 and F2"
include_revisions:
revision_range:
start: daf81de0738cb861b800c4dae1a805e8dabaa544
end: master
path: regression_2.patch
project_name: FeaturePerfCSCollection
shortname: regress_f1_f2
tags:
- regression
- perf_prec
12 changes: 12 additions & 0 deletions SynthFeatureInteraction/regression_2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/projects/SynthFeatureInteraction/main.cpp b/projects/SynthFeatureInteraction/main.cpp
index 5f5029e..994844b 100644
--- a/projects/SynthFeatureInteraction/main.cpp
+++ b/projects/SynthFeatureInteraction/main.cpp
@@ -52,6 +52,7 @@ int main(int argc, char *argv[]) {
fp_util::sleep_for_millisecs(111);

if (F1 && F2 || F3) {
+ fp_util::sleep_for_millisecs(140);
fp_util::sleep_for_millisecs(132);
}

11 changes: 11 additions & 0 deletions SynthIPCombined/regression_1.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: "Inserts small regression into the data handling of the decompressor"
include_revisions:
revision_range:
start: 793035062810ea3a2d9a10f831cd199fbbb82090
end: master
path: regression_1.patch
project_name: FeaturePerfCSCollection
shortname: reg_decompress_data
tags:
- regression
- perf_prec
18 changes: 18 additions & 0 deletions SynthIPCombined/regression_1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/projects/SynthIPCombined/main.cpp b/projects/SynthIPCombined/main.cpp
index e6685d5..9ee15b6 100644
--- a/projects/SynthIPCombined/main.cpp
+++ b/projects/SynthIPCombined/main.cpp
@@ -1,3 +1,5 @@
+#include "fp_util/sleep.h"
+
#include <cstdint>
#include <cstring>
#include <iostream>
@@ -482,6 +484,7 @@ struct decompress_t {
}

if (state.state == state_t::READ_DATA) {
+ fp_util::busy_sleep_for_secs(10);

size_t len = state.msg;

11 changes: 11 additions & 0 deletions SynthIPCombined/regression_2.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: "Inserts small regression into the data handling of the compressor"
include_revisions:
revision_range:
start: 793035062810ea3a2d9a10f831cd199fbbb82090
end: master
path: regression_2.patch
project_name: FeaturePerfCSCollection
shortname: reg_compress_data
tags:
- regression
- perf_prec
21 changes: 21 additions & 0 deletions SynthIPCombined/regression_2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/projects/SynthIPCombined/main.cpp b/projects/SynthIPCombined/main.cpp
index e6685d5..e122ad4 100644
--- a/projects/SynthIPCombined/main.cpp
+++ b/projects/SynthIPCombined/main.cpp
@@ -4,6 +4,8 @@
#include <stdio.h>
#include <vector>

+#include "fp_util/sleep.h"
+
/// This is a synthetic case study using templates and load-time parameters
/// for configuration.
///
@@ -266,6 +268,7 @@ struct compress_t {
size_t blocksize = offsets.blocksize;

while (i != e) {
+ fp_util::busy_sleep_for_millisecs(10);

unsigned char c = *i;

11 changes: 11 additions & 0 deletions SynthIPRuntime/regression_1.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: "Inserts small regression into the data handling of the decompressor"
include_revisions:
revision_range:
start: 793035062810ea3a2d9a10f831cd199fbbb82090
end: master
path: regression_1.patch
project_name: FeaturePerfCSCollection
shortname: reg_decompress_data
tags:
- regression
- perf_prec
18 changes: 18 additions & 0 deletions SynthIPRuntime/regression_1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/projects/SynthIPRuntime/main.cpp b/projects/SynthIPRuntime/main.cpp
index ede9ff9..70f8de7 100644
--- a/projects/SynthIPRuntime/main.cpp
+++ b/projects/SynthIPRuntime/main.cpp
@@ -1,3 +1,5 @@
+#include "fp_util/sleep.h"
+
#include <cstdint>
#include <cstring>
#include <iostream>
@@ -481,6 +483,7 @@ struct decompress_t {
}

if (state.state == state_t::READ_DATA) {
+ fp_util::busy_sleep_for_secs(10);

size_t len = state.msg;

11 changes: 11 additions & 0 deletions SynthIPRuntime/regression_2.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: "Inserts small regression into the data handling of the compressor"
include_revisions:
revision_range:
start: 793035062810ea3a2d9a10f831cd199fbbb82090
end: master
path: regression_2.patch
project_name: FeaturePerfCSCollection
shortname: reg_compress_data
tags:
- regression
- perf_prec
21 changes: 21 additions & 0 deletions SynthIPRuntime/regression_2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/projects/SynthIPRuntime/main.cpp b/projects/SynthIPRuntime/main.cpp
index ede9ff9..a5c27f5 100644
--- a/projects/SynthIPRuntime/main.cpp
+++ b/projects/SynthIPRuntime/main.cpp
@@ -4,6 +4,8 @@
#include <stdio.h>
#include <vector>

+#include "fp_util/sleep.h"
+
/// This is a synthetic case study using load-time configuration.
///
/// Features:
@@ -265,6 +267,7 @@ struct compress_t {
size_t blocksize = offsets.blocksize;

while (i != e) {
+ fp_util::busy_sleep_for_millisecs(10);

unsigned char c = *i;

11 changes: 11 additions & 0 deletions SynthIPTemplate/regression_1.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: "Inserts small regression into the data handling of the decompressor"
include_revisions:
revision_range:
start: 793035062810ea3a2d9a10f831cd199fbbb82090
end: master
path: regression_1.patch
project_name: FeaturePerfCSCollection
shortname: reg_decompress_data
tags:
- regression
- perf_prec
18 changes: 18 additions & 0 deletions SynthIPTemplate/regression_1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/projects/SynthIPTemplate/main.cpp b/projects/SynthIPTemplate/main.cpp
index 49bf78a..19d0962 100644
--- a/projects/SynthIPTemplate/main.cpp
+++ b/projects/SynthIPTemplate/main.cpp
@@ -1,3 +1,5 @@
+#include "fp_util/sleep.h"
+
#include <cstdint>
#include <cstring>
#include <iostream>
@@ -483,6 +485,7 @@ struct decompress_t {
}

if (state.state == state_t::READ_DATA) {
+ fp_util::busy_sleep_for_secs(10);

size_t len = state.msg;

11 changes: 11 additions & 0 deletions SynthIPTemplate/regression_2.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: "Inserts small regression into the data handling of the compressor"
include_revisions:
revision_range:
start: 793035062810ea3a2d9a10f831cd199fbbb82090
end: master
path: regression_2.patch
project_name: FeaturePerfCSCollection
shortname: reg_compress_data
tags:
- regression
- perf_prec
21 changes: 21 additions & 0 deletions SynthIPTemplate/regression_2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/projects/SynthIPTemplate/main.cpp b/projects/SynthIPTemplate/main.cpp
index 49bf78a..fbdd502 100644
--- a/projects/SynthIPTemplate/main.cpp
+++ b/projects/SynthIPTemplate/main.cpp
@@ -4,6 +4,8 @@
#include <stdio.h>
#include <vector>

+#include "fp_util/sleep.h"
+
/// This is a synthetic case study using templates for configuration.
/// Not all features can be properly annotated into the source code because
/// they happen at compile time.
@@ -267,6 +269,7 @@ struct compress_t {
size_t blocksize = offsets.blocksize;

while (i != e) {
+ fp_util::busy_sleep_for_millisecs(10);

unsigned char c = *i;

11 changes: 11 additions & 0 deletions SynthIPTemplate2/regression_1.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: "Inserts small regression into the data handling of the decompressor"
include_revisions:
revision_range:
start: 793035062810ea3a2d9a10f831cd199fbbb82090
end: master
path: regression_1.patch
project_name: FeaturePerfCSCollection
shortname: reg_decompress_data
tags:
- regression
- perf_prec
18 changes: 18 additions & 0 deletions SynthIPTemplate2/regression_1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/projects/SynthIPTemplate2/main.cpp b/projects/SynthIPTemplate2/main.cpp
index 9e1283e..694e19f 100644
--- a/projects/SynthIPTemplate2/main.cpp
+++ b/projects/SynthIPTemplate2/main.cpp
@@ -1,3 +1,5 @@
+#include "fp_util/sleep.h"
+
#include <cstdint>
#include <cstring>
#include <iostream>
@@ -483,6 +485,7 @@ struct decompress_t {
}

if (state.state == state_t::READ_DATA) {
+ fp_util::busy_sleep_for_secs(10);

size_t len = state.msg;

11 changes: 11 additions & 0 deletions SynthIPTemplate2/regression_2.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: "Inserts small regression into the data handling of the compressor"
include_revisions:
revision_range:
start: 793035062810ea3a2d9a10f831cd199fbbb82090
end: master
path: regression_2.patch
project_name: FeaturePerfCSCollection
shortname: reg_compress_data
tags:
- regression
- perf_prec
Loading
Loading