Skip to content

Instantly share code, notes, and snippets.

View brancz's full-sized avatar
❄️
Something something Polar Signals

Frederic Branczyk brancz

❄️
Something something Polar Signals
View GitHub Profile

Keybase proof

I hereby claim:

  • I am brancz on github.
  • I am brancz (https://keybase.io/brancz) on keybase.
  • I have a public key ASDCk1EoKCq2Z_dzuRM8suxa7qivP6oofgEIFo0BMtMR4Ao

To claim this, I am signing this object:

@brancz
brancz / gist:1ae60ec709ab49a9541bdfbfce50a11f
Created June 25, 2020 14:29
GB available for request on nodes excluding master and infra role nodes.
(kube_node_status_allocatable_memory_bytes * on(node) group_left() (kube_node_role{role="worker"} unless ignoring(role) kube_node_role{role="infra"}) - on(node) sum by(node) (kube_pod_container_resource_requests_memory_bytes * on(node) group_left() (kube_node_role{role="worker"} unless ignoring(role) kube_node_role{role="infra"}))) / 1e9
@brancz
brancz / main_test.go
Created December 11, 2020 09:31
Small tests of pprof merges being associative. Not exhaustive, but running this multiple times showed no failures.
package main
import (
"bytes"
"io/ioutil"
"math/rand"
"reflect"
"testing"
"time"