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

[PLAT-14294] Query latency increase workloads #99

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
10 changes: 5 additions & 5 deletions src/main/java/com/yugabyte/sample/apps/AppBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public abstract class AppBase implements MetricsTracker.StatusMessageAppender {
public static final int NUM_KEYS_TO_READ_FOR_YSQL_AND_YCQL = 1500000;

// Variable to track start time of the workload.
private long workloadStartTime = -1;
protected long workloadStartTime = -1;
// Instance of the workload configuration.
public static AppConfig appConfig = new AppConfig();
// The configuration of the load tester.
Expand Down Expand Up @@ -428,8 +428,8 @@ public synchronized void resetClients() {
cassandra_session = null;
}

Random random = new Random();
byte[] buffer;
protected Random random = new Random();
protected byte[] buffer;
Checksum checksum = new Adler32();

// For binary values we store checksum in bytes.
Expand Down Expand Up @@ -852,7 +852,7 @@ public String appenderName() {
/**
* Close the Connection.
*/
static void close(Connection c) {
protected static void close(Connection c) {
if (c != null) {
try {
c.close();
Expand All @@ -865,7 +865,7 @@ static void close(Connection c) {
/**
* Close the PreparedStatement.
*/
static void close(PreparedStatement ps) {
protected static void close(PreparedStatement ps) {
if (ps != null) {
try {
ps.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* which is indexed.
*/
public class CassandraInserts extends CassandraKeyValue {
private static final Logger LOG = Logger.getLogger(CassandraSecondaryIndex.class);
private static final Logger LOG = Logger.getLogger(CassandraInserts.class);

static {
appConfig.readIOPSPercentage = -1;
Expand Down
9 changes: 3 additions & 6 deletions src/main/java/com/yugabyte/sample/apps/CassandraKeyValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,18 @@
import java.util.Arrays;
import java.util.List;

import com.datastax.driver.core.BoundStatement;
import com.datastax.driver.core.PreparedStatement;
import com.datastax.driver.core.ResultSet;
import com.datastax.driver.core.Row;
import org.apache.log4j.Logger;

import com.yugabyte.sample.common.SimpleLoadGenerator.Key;
import com.datastax.driver.core.BoundStatement;
import com.datastax.driver.core.PreparedStatement;

/**
* This workload writes and reads some random string keys from a CQL server. By default, this app
* inserts a million keys, and reads/updates them indefinitely.
*/
public class CassandraKeyValue extends CassandraKeyValueBase {

private static final Logger LOG = Logger.getLogger(CassandraKeyValueBase.class);
private static final Logger LOG = Logger.getLogger(CassandraKeyValue.class);
// The default table name to create and use for CRUD ops.
private static final String DEFAULT_TABLE_NAME = CassandraKeyValue.class.getSimpleName();
static {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* which is indexed.
*/
public class CassandraUniqueSecondaryIndex extends CassandraSecondaryIndex {
private static final Logger LOG = Logger.getLogger(CassandraSecondaryIndex.class);
private static final Logger LOG = Logger.getLogger(CassandraUniqueSecondaryIndex.class);

// The default table name to create and use for CRUD ops.
private static final String DEFAULT_TABLE_NAME =
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/yugabyte/sample/apps/SqlDataLoad.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* Then runs a write workload to load data into the target table.
*/
public class SqlDataLoad extends AppBase {
private static final Logger LOG = Logger.getLogger(SqlInserts.class);
private static final Logger LOG = Logger.getLogger(SqlDataLoad.class);

// Static initialization of this workload's config. These are good defaults for getting a decent
// read dominated workload on a reasonably powered machine. Exact IOPS will of course vary
Expand Down
Loading
Loading