This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # HELP go_gc_cycles_automatic_gc_cycles_total Count of completed GC cycles generated by the Go runtime. Sourced from /gc/cycles/automatic:gc-cycles. | |
| # TYPE go_gc_cycles_automatic_gc_cycles_total counter | |
| go_gc_cycles_automatic_gc_cycles_total 1523 | |
| # HELP go_gc_cycles_forced_gc_cycles_total Count of completed GC cycles forced by the application. Sourced from /gc/cycles/forced:gc-cycles. | |
| # TYPE go_gc_cycles_forced_gc_cycles_total counter | |
| go_gc_cycles_forced_gc_cycles_total 0 | |
| # HELP go_gc_cycles_total_gc_cycles_total Count of all completed GC cycles. Sourced from /gc/cycles/total:gc-cycles. | |
| # TYPE go_gc_cycles_total_gc_cycles_total counter | |
| go_gc_cycles_total_gc_cycles_total 1523 | |
| # HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .DEFAULT_GOAL := fmt | |
| MD_FILES_TO_FORMAT=$(shell find . -name "*.md") | |
| .PHONY: fmt | |
| fmt: ## Format docs. | |
| fmt: | |
| @echo "Formatting markdown files..." | |
| # <command that correctly formats $(MD_FILES_TO_FORMAT) files> | |
| .PHONY: check |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package test | |
| import ( | |
| "context" | |
| "encoding/json" | |
| "fmt" | |
| "io" | |
| "net/http" | |
| "os" | |
| "os/exec" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package yolo | |
| import ( | |
| "context" | |
| "testing" | |
| "github.com/google/go-cmp/cmp" | |
| // Ecosystem is moving away from "gopkg.in/yaml.v2", so let's use what will be used long term | |
| // (does not matter much). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #set -x | |
| # Shows you the largest objects in your repo's pack file. | |
| # Written for osx. | |
| # | |
| # @see https://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/ | |
| # @author Antony Stubbs | |
| # set the internal field separator to line break, so that we can iterate easily over the verify-pack output |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copyright (c) The Thanos Authors. | |
| // Licensed under the Apache License 2.0. | |
| package e2e_test | |
| import ( | |
| "context" | |
| "fmt" | |
| "net" | |
| "net/http" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copyright (c) The Thanos Authors. | |
| // Licensed under the Apache License 2.0. | |
| package manual | |
| import ( | |
| "context" | |
| "io/ioutil" | |
| "os" | |
| "testing" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -e | |
| # Copyright (c) Bartłomiej Płotka @bwplotka | |
| # Licensed under the Apache License 2.0. | |
| # Yolo script allowing nice benchmark framework for iterative work on Go performance. | |
| # Requirements: | |
| # * Prepare worktree if you want to benchmark in background: git worktree add ../thanos_b yolo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package replayable | |
| import ( | |
| "bytes" | |
| "io" | |
| ) | |
| type Reader struct { | |
| wrapped io.Reader |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "testing" | |
| ) | |
| var sink1 = 0 | |
| func BenchmarkNotDefered(b *testing.B) { | |
| for n := 0; n < b.N; n++ { |
NewerOlder