Skip to content

Instantly share code, notes, and snippets.

<?php
// lie to chris php script
// benchmark.php
$high_float = rand(0,100000000000);
$low_float = "0.683745861053";
printf("GPU compute time: %f\n", $low_float);
printf("CPU compute time: %f\n", $high_float);
?>
Name: TCP Selector Manager
State: BLOCKED on org.apache.cassandra.net.TcpConnection@5ab9f791 owned by: MESSAGE-SERIALIZER-POOL:2
Total blocked: 2 Total waited: 0
Stack trace:
org.apache.cassandra.net.TcpConnection.connect(TcpConnection.java:360)
org.apache.cassandra.net.SelectorManager.doProcess(SelectorManager.java:131)
- locked sun.nio.ch.SelectionKeyImpl@2e257f1b
org.apache.cassandra.net.SelectorManager.run(SelectorManager.java:98)
@lenn0x
lenn0x / gist:177871
Created August 30, 2009 05:47
Git Show Branch in Bash
function parse_git_branch {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
GREEN="\[\033[1;32m\]"
YELLOW="\[\033[1;33m\]"
WHITE="\[\033[0;0m\]"
PS1="[\u@\h [$GREEN\W$YELLOW\$(parse_git_branch)$WHITE]\$ "
oprofile: available events for CPU type "AMD64 processors"
CPU_CLK_UNHALTED: (counter: all)
Cycles outside of halt state (min count: 3000)
RETIRED_INSTRUCTIONS: (counter: all)
Retired instructions (includes exceptions, interrupts, re-syncs) (min count: 3000)
RETIRED_UOPS: (counter: all)
Retired micro-ops (min count: 500)
INSTRUCTION_CACHE_FETCHES: (counter: all)
Instruction cache fetches (RevE) (min count: 500)
ERROR [HINTED-HANDOFF-POOL:1] 2009-12-14 22:05:34,191 CassandraDaemon.java (line 71) Fatal exception in thread Thread[HINTED-HANDOFF-POOL:1,5,main]
java.lang.RuntimeException: java.lang.NullPointerException
at org.apache.cassandra.db.HintedHandOffManager$1.run(HintedHandOffManager.java:253)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at org.apache.cassandra.gms.FailureDetector.isAlive(FailureDetector.java:146)
at org.apache.cassandra.db.HintedHandOffManager.sendMessage(HintedHandOffManager.java:106)
at org.apache.cassandra.db.HintedHandOffManager.deliverAllHints(HintedHandOffManager.java:177)
public static byte[] getArray(ByteBuffer buffer)
{
int length = buffer.remaining();
if (buffer.hasArray())
{
int boff = buffer.arrayOffset() + buffer.position();
if (boff == 0 && length == buffer.array().length)
return buffer.array();
else