Skip to content

Commit 5eb0b93

Browse files
author
Tobias Hafner
committed
adjust parameters
1 parent e67e155 commit 5eb0b93

7 files changed

Lines changed: 36 additions & 9 deletions

File tree

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ buildscript {
1414
url = uri("https://plugins.gradle.org/m2/")
1515
}
1616
}
17+
1718
dependencies {
1819
// Shadowing; used to make a fat jar (https://github.com/johnrengelman/shadow)
1920
classpath group: "com.github.johnrengelman", name: "shadow", version: "8.1.1"
@@ -192,6 +193,7 @@ shadowJar {
192193
mergeServiceFiles {
193194
setPath("META-INF/services")
194195
include("io.grpc.*")
196+
include("java.sql.Driver")
195197
}
196198
// Include everything from 'libs' but rename JARs to another extension to trick the plugin
197199
from('libs') {

src/main/java/org/polypheny/simpleclient/scenario/lockingBench/ErrorHandlingPolyphenyScenario.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424

2525
package org.polypheny.simpleclient.scenario.lockingBench;
2626

27+
import java.io.BufferedWriter;
2728
import java.io.File;
29+
import java.io.FileWriter;
30+
import java.io.IOException;
2831
import java.util.ArrayList;
2932
import java.util.Collections;
3033
import java.util.List;
@@ -132,5 +135,24 @@ private double calculateSuccessRatio() {
132135
return Math.round( unroundedRatio * 100.0 ) / 100.0;
133136
}
134137

138+
public void storeIndividualExecutionTimes(File outputDirectory, String baseFileName) {
139+
if (!outputDirectory.exists()) {
140+
outputDirectory.mkdirs();
141+
}
142+
143+
measuredTimePerQueryType.forEach((templateId, times) -> {
144+
File outputFile = new File(outputDirectory, baseFileName + "_template" + templateId + ".txt");
145+
146+
try ( BufferedWriter writer = new BufferedWriter(new FileWriter(outputFile))) {
147+
for (Long time : times) {
148+
writer.write(time.toString());
149+
writer.newLine();
150+
}
151+
} catch ( IOException e) {
152+
throw new RuntimeException( "Exception while exporting individual execution times.", e );
153+
}
154+
});
155+
}
156+
135157

136158
}

src/main/java/org/polypheny/simpleclient/scenario/lockingBench/LockingBench.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,15 @@ public synchronized void store( OutputStream out, String comments) throws IOExce
173173
}
174174
};
175175

176-
String fileName = String.format(
177-
"analysis_S%d_N%d_E%d_R%f.txt",
176+
String baseFileName = String.format(
177+
"analysis_S%d_N%d_E%d_R%f",
178178
config.sessionCount,
179179
config.namespaceCount,
180180
config.entityCount,
181181
config.readWriteRatio);
182182

183+
String fileName = baseFileName + ".txt";
184+
183185
File analysisFile = new File(outputDirectory, fileName);
184186
analyze(analysis, analysisFile);
185187

@@ -193,6 +195,7 @@ public synchronized void store( OutputStream out, String comments) throws IOExce
193195
} catch (IOException e) {
194196
log.error("Exception while generating analysis", e);
195197
}
198+
storeIndividualExecutionTimes( outputDirectory, baseFileName );
196199
}
197200

198201

src/main/resources/org/polypheny/simpleclient/scenario/lockingBench/lockingbench.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# SOFTWARE.
2323
#
2424

25-
numberOfEntriesPerTable = 100
25+
numberOfEntriesPerTable = 1000
2626
maxBatchSize = 100
2727

2828
progressReportBase = 100

src/main/resources/org/polypheny/simpleclient/scenario/oltpbench/tpcc.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
numberOfThreads = 1
1+
numberOfThreads = 16
22
progressReportBase = 100
33
workloadMonitoringExecutingWorkload = true
44
workloadMonitoringLoadingData = true
@@ -14,4 +14,4 @@ newOrderWeight = 45
1414
paymentWeight = 43
1515
orderStatusWeight = 4
1616
deliveryWeight = 4
17-
stockLevelWeight = 4
17+
stockLevelWeight = 4

src/main/resources/org/polypheny/simpleclient/scenario/oltpbench/tpch.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
numberOfThreads = 1
1+
numberOfThreads = 16
22
progressReportBase = 100
33
workloadMonitoringExecutingWorkload = true
44
workloadMonitoringLoadingData = true
@@ -10,4 +10,4 @@ numberOfWarmUpIterations = 0
1010

1111
transactionTypes = Q1,Q3,Q4,Q6,Q9,Q12,Q13,Q14,Q16,Q17
1212

13-
partitionItemTable = false
13+
partitionItemTable = false

src/main/resources/org/polypheny/simpleclient/scenario/oltpbench/ycsb.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
numberOfThreads = 1
1+
numberOfThreads = 16
22
progressReportBase = 100
33
workloadMonitoringExecutingWorkload = true
44
workloadMonitoringLoadingData = true
@@ -16,4 +16,4 @@ updateRecordWeight = 10
1616
deleteRecordWeight = 10
1717
readModifyWriteRecordWeight = 10
1818

19-
partitionTable = false
19+
partitionTable = false

0 commit comments

Comments
 (0)