Skip to content

Instantly share code, notes, and snippets.

insert-st.TotalCount=24100
insert-st.Period(ms)=59994
insert-st.Throughput(ops/sec)=401.71
insert-st.Min=0
insert-st.Mean=1.15
insert-st.50.000ptile=0
insert-st.90.000ptile=1
insert-st.99.000ptile=4
insert-st.99.900ptile=15
insert-st.99.990ptile=61
#Logging op latencies for Cassandra Stress
#[Histogram log format version 1.3]
#[BaseTime: 1468590177.336 (seconds since epoch)]
#[StartTime: 1468590177.336 (seconds since epoch), Fri Jul 15 15:42:57 SAST 2016]
"StartTimestamp","Interval_Length","Interval_Max","Interval_Compressed_Histogram"
Tag=insert-st,0.095,9.989,18.645,HISTFAAABJp42j1Wy4pkRRDNOhk3btatKoumaMqibUSGRnoh4kIGF40LEZFhGIbBL3DtXyjo2o/wA8SVC7/Blb+hXzCec+LWdNH3kTfyxIkTkRn5wY+/nlrb/tnqr6/3jS/vv3375b818M/PG5zw0wa/bfD7Bs/wIc74Ir7h4A4TPsNHOKBhy/EJUxxxw7EJM0cm3zu/HkNX4B6QgT6cOdCCl1kPsgt+ucGWpveE3MEIIKbumtY52Plpjh5nhAYEO9NA4HaRctxCkJeYUvMhp3Z1opMtATqNYwZoZluOxKSXKUymh0IaNACJEUF2HteVTMSZwx3h+DjcU0G16CbFWOo5m3wbocYbOFxo5sa3yXAznc+UDxpoKUam3hxYGEJMMWfA0LQq1AmOyMgtQnz4g33qulO4qS/bNQ+r4o4rcTucCynQYk6kIMRqRjjqOTRZZENBU+NImZqdbgh+528YvZD4YwLsVzHIs63mITct+Sx9m0ywpCYsQ+YMTXkDXwIjhx5BVnrTlMhcJLnm8z+7rDmlOOhZGHppudA4255zLCIB7AlD9eAJybEIgYswctCtjdJ+OciptFiIu9BoKW6LKyr6aA6+Dcq/dAbVQkyUi7RKpN6lTEWrkYqa+O8xdEVQ6JLa2FgUbRupBEkKxq04kY6JEg05zOG3wF7X3I9mqcLSmpIlGS5FyYZF80
Connected to cluster: Test Cluster, max pending requests per connection 128, max connections per host 8
Datatacenter: datacenter1; Host: localhost/127.0.0.1; Rack: rack1
Created schema. Sleeping 1s for propagation.
Sleeping 2s...
Warming up insert with 50000 iterations...
Failed to connect over JMX; not collecting these stats
Generating batches with [1..50] partitions and [2..8000] rows (of [20..8000] total rows in the partitions)
Warming up simple1 with 50000 iterations...
Failed to connect over JMX; not collecting these stats
Running [insert, simple1] with 3 threads 60 seconds
Connected to cluster: Test Cluster, max pending requests per connection 128, max connections per host 8
Datatacenter: datacenter1; Host: localhost/127.0.0.1; Rack: rack1
Created schema. Sleeping 1s for propagation.
Sleeping 2s...
Warming up insert with 50000 iterations...
Failed to connect over JMX; not collecting these stats
Generating batches with [1..50] partitions and [2..8000] rows (of [20..8000] total rows in the partitions)
Warming up simple1 with 50000 iterations...
Failed to connect over JMX; not collecting these stats
Running [insert, simple1] with 3 threads 60 seconds
Connected to cluster: Test Cluster, max pending requests per connection 128, max connections per host 8
Datatacenter: datacenter1; Host: localhost/127.0.0.1; Rack: rack1
Created schema. Sleeping 1s for propagation.
Sleeping 2s...
Warming up insert with 50000 iterations...
Failed to connect over JMX; not collecting these stats
Generating batches with [1..50] partitions and [2..8000] rows (of [20..8000] total rows in the partitions)
Warming up simple1 with 50000 iterations...
Failed to connect over JMX; not collecting these stats
Running [insert, simple1] with 3 threads 60 seconds
/* trimmed down and reformatted for blog, see cassandra repo for actual code */
public final class Timer {
private Histogram responseTime = new Histogram(3);
private Histogram serviceTime = new Histogram(3);
private Histogram waitTime = new Histogram(3);
private long intendedTimeNs;
private long startTimeNs;
private long endTimeNs;
public void intendedTimeNs(long v) {
/* trimmed down and reformatted for blog, see cassandra repo for actual code */
/**
* Provides a 'next operation time' for rate limited operation streams. The rate limiter is thread safe and is to be
* shared by all consumer threads.
*/
private static class UniformRateLimiter {
long start = Long.MIN_VALUE;
final long intervalNs;
final AtomicLong opIndex = new AtomicLong();
@Benchmark
public long adler32(){
adler.update(buffer);
return adler.getValue();
}
# Benchmark (size) Mode Cnt Score Error Units
adler32 1000 avgt 50 1003.068 ± 4.994 ns/op
# Flat Profile (by line):
(t 98.9,s 98.9) java.util.zip.Adler32::updateBytes @ (bci=-3,line=-100)
@Benchmark
public int systemArrayCopy() {
System.arraycopy(buffer, 0, dst, 0, buffer.length);
return dst[buffer.length-1];
}
# Flat Profile (by line):
(t 62.9,s 62.9) AGCT::Unknown Java[ERR=-5] @ (bci=-1,line=-100)
(t 19.5,s 19.5) systemArrayCopy_avgt_jmhStub @ (bci=29,line=165)
(t 2.7,s 2.7) systemArrayCopy @ (bci=15,line=3)
@Benchmark
public void copy() {
byte b = 0;
for (int i = 0; i < buffer.length; i++) {
dst[i] = buffer[i];
}
result = dst[buffer.length-1] == 1;
}
# Honest-Profiler reports: