Skip to content

Instantly share code, notes, and snippets.

View pstibrany's full-sized avatar

Peter Štibraný pstibrany

View GitHub Profile
Index: libexec/src/runtime/mheap.go
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/libexec/src/runtime/mheap.go b/libexec/src/runtime/mheap.go
--- a/libexec/src/runtime/mheap.go
+++ b/libexec/src/runtime/mheap.go (date 1689930139354)
@@ -1003,6 +1003,17 @@
}
#!/usr/local/bin/jq -f
{
"ulid": .ulid,
"minTime": (.minTime / 1000 | todateiso8601),
"maxTime": (.maxTime / 1000 | todateiso8601),
"stats": .stats,
"thanos": .thanos,
"compaction": {
"level": .compaction.level,
$ benchstat master2.txt wip2.txt
name old time/op new time/op delta
MetricsCollections10 2.88ms ± 0% 2.82ms ± 0% ~ (p=1.000 n=1+1)
MetricsCollections100 33.2ms ± 0% 34.3ms ± 0% ~ (p=1.000 n=1+1)
MetricsCollections1000 358ms ± 0% 347ms ± 0% ~ (p=1.000 n=1+1)
MetricsCollections10000 4.06s ± 0% 3.95s ± 0% ~ (p=1.000 n=1+1)
ChunkQueryable/rate(foo[1m])/step_1m0s/DoubleDelta/matrixes/ 451ms ± 0% 447ms ± 0% ~ (p=1.000 n=1+1)
ChunkQueryable/rate(foo[1m])/step_1m0s/DoubleDelta/iterators/ 462ms ± 0% 475ms ± 0% ~ (p=1.000 n=1+1)
ChunkQueryable/rate(foo[1m])/step_1m0s/DoubleDelta/batches/ 402ms ± 0
benchstat golden.master.out wip.out
name old time/op new time/op delta
MetricsCollections10 2.80ms ± 0% 2.76ms ± 0% ~ (p=1.000 n=1+1)
MetricsCollections100 31.6ms ± 0% 31.3ms ± 0% ~ (p=1.000 n=1+1)
MetricsCollections1000 337ms ± 0% 353ms ± 0% ~ (p=1.000 n=1+1)
MetricsCollections10000 6.00s ± 0% 4.56s ± 0% ~ (p=1.000 n=1+1)
ChunkQueryable/rate(foo[1m])/step_1m0s/DoubleDelta/matrixes/ 440ms ± 0% 475ms ± 0% ~ (p=1.000 n=1+1)
ChunkQueryable/rate(foo[1m])/step_1m0s/DoubleDelta/iterators/ 443ms ± 0% 446ms ± 0% ~ (p=1.000 n=1+1)
ChunkQueryable/rate(foo[1m])/step_1m0s/DoubleDelta/batches/ 395ms
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis a tristique quam. Fusce sed enim quis ante eleifend vehicula quis nec dui. Suspendisse eu mollis lorem. Suspendisse posuere, quam non imperdiet hendrerit, erat nulla euismod leo, ac eleifend sem nulla ac dolor. Fusce hendrerit turpis et ante cursus, eget pulvinar magna efficitur. Morbi commodo nunc vitae nisi rutrum, eu egestas leo dictum. Aenean facilisis justo turpis, nec blandit felis fermentum dictum. Ut ornare dignissim rhoncus. Proin lacus sapien, consequat faucibus congue in, vestibulum in elit. Nunc mollis vel lectus ut pharetra. Vivamus non fringilla risus. Vivamus congue vestibulum accumsan. Cras lacinia ultrices felis, quis ullamcorper nisl consequat a. Nam et bibendum orci. Nulla malesuada felis elit, at facilisis lorem maximus quis. Vivamus lectus lacus, varius non orci elementum, tempor dapibus erat. Suspendisse ac blandit mi, sed fermentum odio. Nulla leo mauris, bibendum sit amet turpis vitae, mattis scelerisque nisi. Pellentesque a
@pstibrany
pstibrany / render.js
Last active August 29, 2015 14:18
phantomjs script to download and render page to the file (use .pdf extension to get PDF output)
var system = require('system');
if (system.args.length < 3) {
console.log('Usage: render.js <output.pdf> <URL>');
phantom.exit();
}
var url = system.args[2];
var output = system.args[1];
@pstibrany
pstibrany / ramdisk.sh
Created August 6, 2014 07:38
ramdisk.sh
#!/bin/bash
NAME=ramdisk
# SIZE_MB=3072
SIZE_MB=2048
MOUNTED=`mount | sed -e 's+.*on \(.*\) (.*+\1+' | grep "^/Volumes/$NAME$"`
if [ -n "$MOUNTED" ]; then
echo "$MOUNTED is already mounted. Not mounting again."
exit 1
peter@Litestar:~ #507 15:07 :( brew install htop
==> Downloading https://github.com/max-horvath/htop-osx/tarball/0.8.2.1-2012-04-18
Already downloaded: /Library/Caches/Homebrew/htop-osx-0.8.2.tgz
==> ./autogen.sh
aclocal: error: aclocal: file '/usr/local/share/aclocal/libgcrypt.m4' does not exist
configure.ac:6: error: possibly undefined macro: AM_INIT_AUTOMAKE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:13: error: possibly undefined macro: AM_PROG_CC_C_O
configure.ac:15: error: possibly undefined macro: AM_DISABLE_SHARED
@pstibrany
pstibrany / gist:1306977
Created October 23, 2011 07:10
Keep screenshot every 30 seconds
while true
do
DATETIME=`date "+%d.%m.%Y_%H:%M:%S"`
TEMP=`mktemp -t screenshot`
TEMP_PNG="${TEMP}.png"
screencapture -x -C "${TEMP_PNG}"
convert "${TEMP_PNG}" -resize 800x600\> "Screenshot_${DATETIME}.png"
rm $TEMP $TEMP_PNG
sleep 30
done