Skip to content

Instantly share code, notes, and snippets.

View pidster's full-sized avatar

Stuart Williams pidster

View GitHub Profile
---
platform: linux
image_resource:
type: registry-image
source:
repository: adoptopenjdk/openjdk11
tag: alpine
inputs:
Benchmark Mode Cnt Score Error Units
TimeSourceComparisonBenchmarks.aeonNanosMxBeanThreadCpuTime thrpt 200 0.001 ± 0.001 ops/ns
TimeSourceComparisonBenchmarks.aeonNanosSystemNanoTime thrpt 200 0.023 ± 0.001 ops/ns
TimeSourceComparisonBenchmarks.aeonTickingClock thrpt 200 0.341 ± 0.008 ops/ns
TimeSourceComparisonBenchmarks.clockSystemUTC thrpt 200 0.023 ± 0.001 ops/ns
TimeSourceComparisonBenchmarks.systemCurrentTimeMillis thrpt 200 0.023 ± 0.001 ops/ns
TimeSourceComparisonBenchmarks.systemNanoTime thrpt 200 0.026 ± 0.001 ops/ns
TimeSourceComparisonBenchmarks.aeonNanosMxBeanThreadCpuTime avgt 200 1202.577 ± 25.104 ns/op
TimeSourceComparisonBenchmarks.aeonNanosSystemNanoTime avgt 200 38.857 ± 0.571 ns/op
TimeSourceComparisonBenchmarks.aeonTickingClock avgt 200 3.506 ± 0.403 ns/op
# https://mechanical-sympathy.blogspot.co.uk/2011/12/java-sequential-io-performance.html
# MBP 13" 2015
#
# Run 01
RandomAccessFile write=332,251,784 read=505,024,351 bytes/sec
RandomAccessFile write=323,704,903 read=549,061,662 bytes/sec
RandomAccessFile write=340,482,128 read=745,744,196 bytes/sec
RandomAccessFile write=344,259,539 read=675,796,073 bytes/sec
RandomAccessFile write=341,376,005 read=750,595,565 bytes/sec
BufferedStreamFile write=36,715,175 read=193,989,912 bytes/sec

Keybase proof

I hereby claim:

  • I am pidster on github.
  • I am pidster (https://keybase.io/pidster) on keybase.
  • I have a public key whose fingerprint is 0D7E 15FB 2B3A D181 21B9 74C8 0B66 2050 6259 0808

To claim this, I am signing this object:

public class AtomicLongThreadedTimeSupplier implements Supplier<Instant> {
private static final AtomicLong counter = new AtomicLong();
private final AtomicLong epochMilli = new AtomicLong();
private final long timeout;
public AtomicLongThreadedTimeSupplier() {
this(1000L);
#!/bin/bash
# PURPOSE
#
# The Gradle wrapper[1] is a simple and convenient way of making Gradle
# builds self-contained and reproducible. However, in multi-project
# builds, it can be cumbersome to type in relative paths e.g.:
# ./gradlew # when in root
# ../gradlew # when in subdir
#
@pidster
pidster / gist:4594060
Created January 22, 2013 11:54
Sample of runOnWorker() implementation.
public void runOnWorker(final Handler<Void> handler) {
Context context = getOrAssignContext();
context.executeOnWorker(new Runnable() {
public void run() {
handler.handle(null);
}
});
}
@pidster
pidster / hack.sh
Created March 31, 2012 14:35 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#