Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion phoenix-pherf/pom.xml
Original file line numberDiff line numberDiff line change
Expand Up@@ -94,7 +94,6 @@
</dependencyManagement>

<dependencies>

<dependency>
<groupId>org.apache.phoenix.thirdparty</groupId>
<artifactId>phoenix-shaded-guava</artifactId>
Expand All@@ -121,6 +120,10 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
Expand DownExpand Up@@ -314,13 +317,15 @@
<artifactSet>
<includes>
<include>org.apache.phoenix:phoenix-pherf</include>
<include>org.apache.phoenix.thirdparty:phoenix-shaded-guava</include>
<include>com.googlecode.java-diff-utils:diffutils</include>
<include>org.apache.commons:commons-lang3</include>
<include>org.apache.commons:commons-math3</include>
<include>org.apache.phoenix.thirdparty:phoenix-shaded-commons-cli</include>
<include>joda-time:joda-time</include>
<include>org.apache.commons:commons-csv</include>
<include>commons-lang:commons-lang</include>
<include>commons-io:commons-io</include>
</includes>
</artifactSet>
<filters>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -54,8 +54,7 @@ public HashMap<String, String> mapResults(Result r) throws IOException {
public void testPherfMain() throws Exception {
String[] args = { "-q", "-l",
"--schemaFile", ".*create_prod_test_unsalted.sql",
"--scenarioFile", ".*prod_test_unsalted_scenario.xml",
"-m", "--monitorFrequency", "10" };
"--scenarioFile", ".*prod_test_unsalted_scenario.xml"};
Pherf pherf = new Pherf(args);
pherf.run();

Expand Down
42 changes: 42 additions & 0 deletions phoenix-pherf/src/it/resources/pherf.properties
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# General purpose thread pool size for Pherf. It's used for things like monitor threads.This should remain small
# to limit the amount of background tasks sucking up resources away from tests.
pherf.default.threadpool=10

# Interval in Ms that the JMX monitors will take a snapshot and dump to log
pherf.default.monitorFrequency=30000

# Default value to display log line after every 'N' row load
pherf.default.log_per_nrows=1000000

# Default number of writers to use when loading data
# 0 - Set the number of writers to use all available cores
# 1-N - ANy integer value for the number of threads to use
pherf.default.dataloader.threadpool=0

# When upserting, this is the max # of rows that will be inserted in a single commit
pherf.default.dataloader.batchsize=1000

# Directory where results from a scenario run will be written
pherf.default.results.dir=/tmp/RESULTS

# Google chart summary html file
pherf.default.summary.file=/tmp/RESULTS/summary.html

# Threshold for comparator to fail. ex. 0.5 equates to 50%
pherf.default.comparison.threshold=0.45
6 changes: 3 additions & 3 deletions phoenix-pherf/src/test/resources/scenario/test_scenario.xml
Original file line numberDiff line numberDiff line change
Expand Up@@ -306,12 +306,12 @@

<scenario tableName="PHERF.TEST_TABLE" rowCount="99" name="testPreAndPostDdls">
<preScenarioDdls>
<ddl statement="CREATE INDEX IDX_DIVISION ON ? (DIVISION)" tableName="PHERF.PHERF_PROD_TEST_UNSALTED"/>
<ddl statement="CREATE INDEX IDX_DIVISION ON ? (DIVISION)" tableName="PHERF.TEST_TABLE"/>
</preScenarioDdls>

<postScenarioDdls>
<ddl statement="CREATE INDEX IDX_OLDVAL_STRING ON ? (OLDVAL_STRING)" tableName="PHERF.PHERF_PROD_TEST_UNSALTED"/>
<ddl statement="CREATE INDEX IDX_CONNECTION_ID ON ? (CONNECTION_ID)" tableName="PHERF.PHERF_PROD_TEST_UNSALTED"/>
<ddl statement="CREATE INDEX IDX_OLDVAL_STRING ON ? (OLDVAL_STRING)" tableName="PHERF.TEST_TABLE"/>
<ddl statement="CREATE INDEX IDX_CONNECTION_ID ON ? (CONNECTION_ID)" tableName="PHERF.TEST_TABLE"/>
</postScenarioDdls>

<querySet concurrency="1" executionType="SERIAL" executionDurationInMs="5000"
Expand Down