Skip to content

Instantly share code, notes, and snippets.

Avatar

Tim Harper timcharper

View GitHub Profile
@timcharper
timcharper / output.json
Created Mar 20, 2018
OrientDB simple delete benchmark
View output.json
{"op": "removing each vertex one at a time", "secs": 5.85228219}
{"op": "method 1", "secs": 5.87633618}
{"op": "removing edges first", "secs": 31.594552465}
{"op": "removing each vertex one at a time", "secs": 0.48545163}
{"op": "method 2", "secs": 32.106060129}
{"op": "remove edges via sql", "secs": 2.645357744}
{"op": "remove vertices via direct delete sql", "secs": 6.376951457}
{"op": "method 3", "secs": 9.050751531}
View keybase.md

Keybase proof

I hereby claim:

  • I am timcharper on github.
  • I am timcharper (https://keybase.io/timcharper) on keybase.
  • I have a public key ASA55PBWERBlKtFZOOxM-PPqyojWNz0ttZGh7X7FP4E8Gwo

To claim this, I am signing this object:

@timcharper
timcharper / akka_streams_pitfalls_1.sc
Last active Dec 5, 2017 — forked from aludwiko/akka_streams_pitfalls_1.scala
Download this and run with ammonite
View akka_streams_pitfalls_1.sc
#!/usr/bin/env amm
import $ivy.`com.typesafe.akka::akka-stream:2.5.4`
import akka.Done
import akka.stream._
import akka.stream.scaladsl._
import scala.concurrent.Future
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.duration._
View rate-limiting-works
10:33 $ grep "rate limited" consoleTest10
ERROR[08:57:10 DockerAppIntegrationTest-MesosMaster-32774] ProcessLogger DockerAppIntegrationTest-MesosMaster-32774 was rate limited; 51 lines were supressed
ERROR[08:57:11 ReadinessCheckIntegrationTest-MesosMaster-32785] ProcessLogger ReadinessCheckIntegrationTest-MesosMaster-32785 was rate limited; 66 lines were supressed
ERROR[08:57:11 GroupDeployIntegrationTest-MesosMaster-32784] ProcessLogger GroupDeployIntegrationTest-MesosMaster-32784 was rate limited; 66 lines were supressed
ERROR[08:57:11 MarathonStartupIntegrationTest-MesosMaster-32778] ProcessLogger MarathonStartupIntegrationTest-MesosMaster-32778 was rate limited; 66 lines were supressed
ERROR[08:57:12 LaunchQueueIntegrationTest-MesosMaster-32793] ProcessLogger LaunchQueueIntegrationTest-MesosMaster-32793 was rate limited; 57 lines were supressed
ERROR[08:57:17 ZooKeeperTest-MesosMaster-32805] ProcessLogger ZooKeeperTest-MesosMaster-32805 was rate limited; 56 lines were supressed
ERROR[08:57:48 AppDeployI
@timcharper
timcharper / rpmbuild
Last active Mar 14, 2018
Docker powered rpm-build (HACK that works for sbt-native-packager); put in your path and chmod +x
View rpmbuild
#!/bin/bash
# silly little workaround to make rpmbuild work through docker
# Build the image if it doesn't already exist
if !(docker inspect rpm-build 2>/dev/null 1>/dev/null); then
echo "rpm-build image does not exist; building"
rm -rf /tmp/rpm-build
mkdir -p /tmp/rpm-build
cat <<-EOF > /tmp/rpm-build/Dockerfile
@timcharper
timcharper / download-checked.sh
Created Aug 5, 2017
Download file checking sha256sum
View download-checked.sh
#/bin/bash
URL="$1"
DEST="$2"
SHA256SUM=$3
curl -L -f -o "${2}.tmp" "$1"
do_sha256sum() {
cmd=$(which sha256sum shasum | head -n 1)
case $(basename "$cmd") in
@timcharper
timcharper / README.md
Created Jun 16, 2017
Strange deadlock issue
View README.md

We have encountered a strange deadlock scenario in which it appears that all threads are waiting on acquiring a ReentrantLock, but no thread has the lock. A scan of the above thread dump reveals that all threads are stuck on Lock.scala:7, which is as follows:

/Users/tim/src/m8e/marathon-1.4/src/main/scala/mesosphere/marathon/util/Lock.scala

   1 | package mesosphere.marathon.util
   2 | 
   3 | import java.util.concurrent.locks.{ ReentrantLock, ReentrantReadWriteLock }
   4 | 
   5 | class RichLock(private val lock: ReentrantLock) extends AnyVal {
View Debouncer.scala
package org.ensime.util
import akka.actor.Scheduler
import java.time.Clock
import java.util.concurrent.atomic.{ AtomicBoolean, AtomicInteger }
import org.slf4j.LoggerFactory
import scala.concurrent.ExecutionContext
import scala.concurrent.duration._
/**
@timcharper
timcharper / thread-dump-2.txt
Created May 4, 2017
ensime-server-issue-1770-thread-dump
View thread-dump-2.txt
2017-05-04 14:20:43
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.112-b16 mixed mode):
"*** Profiler Agent Special Execution Thread 8" #82 daemon prio=10 os_prio=31 tid=0x00007faf82aa2800 nid=0x9f0b runnable [0x0000700008e5d000]
java.lang.Thread.State: RUNNABLE
at org.netbeans.lib.profiler.server.system.Classes.doRedefineClasses(Native Method)
at org.netbeans.lib.profiler.server.system.Classes.redefineClasses(Classes.java:149)
at org.netbeans.lib.profiler.server.ProfilerInterface.redefineClasses(ProfilerInterface.java:1289)
at org.netbeans.lib.profiler.server.ProfilerInterface.instrumentMethodGroupNow(ProfilerInterface.java:1221)
@timcharper
timcharper / thread-dump-2.txt
Created May 4, 2017
ensime-server-issue-1770-thread-dump
View thread-dump-2.txt
2017-05-04 14:20:43
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.112-b16 mixed mode):
"*** Profiler Agent Special Execution Thread 8" #82 daemon prio=10 os_prio=31 tid=0x00007faf82aa2800 nid=0x9f0b runnable [0x0000700008e5d000]
java.lang.Thread.State: RUNNABLE
at org.netbeans.lib.profiler.server.system.Classes.doRedefineClasses(Native Method)
at org.netbeans.lib.profiler.server.system.Classes.redefineClasses(Classes.java:149)
at org.netbeans.lib.profiler.server.ProfilerInterface.redefineClasses(ProfilerInterface.java:1289)
at org.netbeans.lib.profiler.server.ProfilerInterface.instrumentMethodGroupNow(ProfilerInterface.java:1221)
You can’t perform that action at this time.