Skip to content

Instantly share code, notes, and snippets.

View liggitt's full-sized avatar

Jordan Liggitt liggitt

  • Google
  • United States
View GitHub Profile
goos: darwin
goarch: arm64
pkg: github.com/prometheus/client_golang/api/prometheus/v1
cpu: Apple M4 Pro
BenchmarkSamplesJsonSerialization/series=10/dp=10/type=floats-14 30391 40560 ns/op 22241 B/op 468 allocs/op
BenchmarkSamplesJsonSerialization/series=10/dp=10/type=floats-14 28408 40819 ns/op 22240 B/op 468 allocs/op
BenchmarkSamplesJsonSerialization/series=10/dp=10/type=floats-14 31419 38487 ns/op 22240 B/op 468 allocs/op
BenchmarkSamplesJsonSerialization/series=10/dp=10/type=floats-14 30973 38781 ns/op 22240 B/op 468 allocs/op
BenchmarkSamplesJsonSerialization/series=10/dp=10/type=floats-14 30294 39627 ns/op 22241 B/op 468 allocs/op
BenchmarkSamplesJsonSerialization/series=10/dp=10/type=floats-14 30826 39009 ns/op 22240 B/op 468 allocs/op
goos: darwin
goarch: arm64
pkg: github.com/prometheus/common/model
cpu: Apple M4 Pro
BenchmarkSamplesJSONUnmarshal/series=10/dp=10/type=floats-14 25378 46003 ns/op 28696 B/op 462 allocs/op
BenchmarkSamplesJSONUnmarshal/series=10/dp=10/type=floats-14 26908 44972 ns/op 28696 B/op 462 allocs/op
BenchmarkSamplesJSONUnmarshal/series=10/dp=10/type=floats-14 26848 44497 ns/op 28696 B/op 462 allocs/op
BenchmarkSamplesJSONUnmarshal/series=10/dp=10/type=floats-14 27100 44412 ns/op 28696 B/op 462 allocs/op
BenchmarkSamplesJSONUnmarshal/series=10/dp=10/type=floats-14 26875 44625 ns/op 28696 B/op 462 allocs/op
BenchmarkSamplesJSONUnmarshal/series=10/dp=10/type=floats-14 26888 44574 ns/op 28696 B/op 462 allocs/op
#!/usr/bin/env bash
# Sample workflow for dealing with a stack of branches and associated PRs:
#
# 0. Ensure git --update-refs is enabled (only need to do this once):
# # https://andrewlock.net/working-with-stacked-branches-in-git-is-easier-with-update-refs/
# git config --global --add --bool rebase.updateRefs true
#
# 1. Make stacked branches, each with commits for logical layers of a feature
# git checkout -b myfeature-1-api-types master
- ./pkg/apis/runtime/v1.(*ContainerStatus).Marshal, method set of *FakeContainer: removed
- ./pkg/apis/runtime/v1.(*ContainerStatus).MarshalTo, method set of *FakeContainer: removed
- ./pkg/apis/runtime/v1.(*ContainerStatus).MarshalToSizedBuffer, method set of *FakeContainer: removed
- ./pkg/apis/runtime/v1.(*ContainerStatus).Size, method set of *FakeContainer: removed
- ./pkg/apis/runtime/v1.(*ContainerStatus).Unmarshal, method set of *FakeContainer: removed
- ./pkg/apis/runtime/v1.(*ContainerStatus).XXX_DiscardUnknown, method set of *FakeContainer: removed
- ./pkg/apis/runtime/v1.(*ContainerStatus).XXX_Marshal, method set of *FakeContainer: removed
- ./pkg/apis/runtime/v1.(*ContainerStatus).XXX_Merge, method set of *FakeContainer: removed
- ./pkg/apis/runtime/v1.(*ContainerStatus).XXX_Size, method set of *FakeContainer: removed
- ./pkg/apis/runtime/v1.(*ContainerStatus).XXX_Unmarshal, method set of *FakeContainer: removed
/*
Copyright 2025 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@liggitt
liggitt / discovery_dynamic_client.go
Last active May 8, 2025 20:41
discovery_dynamic_client.go
package main
import (
"context"
"fmt"
"os"
"path/filepath"
"k8s.io/klog/v2"
@liggitt
liggitt / k8s-stats.sh
Last active August 3, 2025 20:12
Kubernetes dependency stats
#!/usr/bin/env bash
# Graph at:
# https://docs.google.com/spreadsheets/d/1gtfXBuvBbS5OGHDX78Ax7I9ZKwNbn9l895Y6QlhhJGc/edit
#
# Results at:
# https://gist.github.com/liggitt/c85167509c56481c46c7bf602616041f
go install github.com/hhatto/gocloc/cmd/gocloc@latest
go install github.com/kubernetes-sigs/depstat@latest
DEBUG CREATED:
{
"metadata": {
"name": "test",
"namespace": "default",
"uid": "1270bfa8-8a02-4e06-862d-08e9e0cca377",
"resourceVersion": "2488",
"generation": 1,
"creationTimestamp": "2025-03-04T19:25:20Z",
"managedFields": [
git grep -E '// (INFO|WARNING):.*(requires manual conversion|opted out of conversion generation)'
cmd/kubeadm/app/apis/kubeadm/v1beta3/zz_generated.conversion.go: // INFO: in.ComponentConfigs opted out of conversion generation
cmd/kubeadm/app/apis/kubeadm/v1beta3/zz_generated.conversion.go: // INFO: in.CIKubernetesVersion opted out of conversion generation
cmd/kubeadm/app/apis/kubeadm/v1beta3/zz_generated.conversion.go: // WARNING: in.Proxy requires manual conversion: does not exist in peer-type
cmd/kubeadm/app/apis/kubeadm/v1beta3/zz_generated.conversion.go: // INFO: in.CIImageRepository opted out of conversion generation
cmd/kubeadm/app/apis/kubeadm/v1beta3/zz_generated.conversion.go: // WARNING: in.EncryptionAlgorithm requires manual conversion: does not exist in peer-type
cmd/kubeadm/app/apis/kubeadm/v1beta3/zz_generated.conversion.go: // WARNING: in.ExtraArgs requires manual conversion: inconvertible types (map[string]string vs []k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm.Arg)
cmd/kubeadm/app/apis/
@liggitt
liggitt / bench.json
Last active October 9, 2024 19:05
encoding/json unmarshal regression
{
"int": 1,
"bool": true,
"string": "This is a test of a string 1",
"map": {
"a": "1",
"b": "2",
"c": "3",
"d": "4"
},