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 ( | |
"context" | |
"flag" | |
"fmt" | |
"github.com/docker/docker/api/types" | |
"github.com/docker/docker/api/types/filters" | |
"github.com/docker/docker/client" | |
//"github.com/guptarohit/asciigraph" |
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 ( | |
"context" | |
"fmt" | |
"time" | |
"github.com/prometheus/client_golang/api" | |
"github.com/prometheus/client_golang/api/prometheus/v1" | |
"github.com/prometheus/common/model" | |
) |
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 | |
// it will 'sniff' all UDP traffic and collect stats for Aeron messaging flows | |
// https://github.com/real-logic/aeron/wiki/Protocol-Specification | |
// the output will be a collection of gauges with a label containing src-dst-port like: | |
// NetStat{traffic="127.0.0.1-40123-127.0.0.1-55755"} 1960 | |
import ( | |
"flag" | |
"fmt" |
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 | |
//based on https://github.com/prometheus/prometheus/blob/release-2.8/documentation/examples/remote_storage/example_write_adapter/server.go | |
import ( | |
"bufio" | |
"bytes" | |
"compress/zlib" | |
"flag" | |
"fmt" | |
"github.com/aws/aws-sdk-go/aws" |
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 ( | |
"bufio" | |
"bytes" | |
"compress/zlib" | |
"flag" | |
"fmt" | |
"github.com/gogo/protobuf/proto" | |
"github.com/golang/snappy" |
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 ( | |
"fmt" | |
"log" | |
"os" | |
//"io/ioutil" | |
"runtime/pprof" | |
) | |
func main() { |
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 ( | |
"flag" | |
b64 "encoding/base64" | |
"fmt" | |
"github.com/clsung/grcode" | |
//"github.com/maruel/natural" | |
"io/ioutil" | |
"os" |
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 ( | |
"flag" | |
"fmt" | |
b64 "encoding/base64" | |
"github.com/skip2/go-qrcode" | |
"math" | |
"os" | |
//"strconv" |
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
/* | |
==================================== | |
Build it as standalone binary : | |
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o memhog memhog.g | |
==================================== | |
Build its container : | |
FROM scratch |
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
// This utility allows you to run a command which produce a file and interrup it when a certain size is reached | |
package main | |
import( | |
"flag" | |
"fmt" | |
"log" | |
"os" | |
"os/exec" | |
"time" |