Benchmore - A package allows you to report On-CPU Time in addition to the wall time measured by Go's builtin benchmarking framework

Overview

benchmore

This package allows you to report On-CPU Time in addition to the wall time measured by Go's builtin benchmarking framework. Example:

import "github.com/felixge/benchmore"

func BenchmarkAdd(b *testing.B) {
	defer benchmore.ReportCPUTime(b)()

	for i := 0; i < b.N; i++ {
		Add(i, i)
	}
}

func Add(a, b int) int {
	return a + b
}
goos: darwin
goarch: amd64
pkg: github.com/felixge/benchmore
cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
BenchmarkAdd-12    	1000000000	        0.2546 ns/op	        0.2545 cpu-ns/op
PASS
ok  	github.com/felixge/benchmore	0.429s

More benchmore?

This package was created as a quick proof of concept response to a tweet by @bwplotka.

In the future it could be extended to capture other metrics such as heap, rss, context switches, etc.

License

MIT

Issues
  • Rename package to match module

    Rename package to match module

    Currently package name is different from module and it brings minor inconvenience. Example in README suggests package name should match module, so this PR renames the package.

    opened by vearutop 1
Owner
Felix Geisendörfer
Felix Geisendörfer
Every 10 minutes, memory, cpu and storage usage is checked and if they over 80%, sending alert via email.

linux-alert Every 10 minutes, memory, cpu and storage usage is checked and if they over 80%, sending alert via email. Usage Create .env file from .env

Meliksah Cetinkaya 0 Feb 6, 2022
Simple Golang tool for monitoring linux cpu, ram and disk usage.

Simple Golang tool for monitoring linux cpu, ram and disk usage.

Meliksah Cetinkaya 1 Mar 19, 2022
Package httpretty prints the HTTP requests you make with Go pretty on your terminal.

httpretty Package httpretty prints the HTTP requests of your Go programs pretty on your terminal screen. It is mostly inspired in curl's --verbose mod

Henrique Vicente 270 Aug 13, 2022
With this package you can create your own syslog server with your own handlers for different kind of syslog messages

Using this library you can easy implement your own syslog server that: Can listen on multiple UDP ports and unix domain sockets. Can pass parsed syslo

Michał Derkacz 68 Dec 15, 2021
Filez - A tiny package showing you File info

filez A tiny package showing you File info Install go get -v github.com/Cne3Rd/f

Mukaila Samsondeen 1 Feb 4, 2022
Time Series Alerting Framework

Bosun Bosun is a time series alerting framework developed by Stack Exchange. Scollector is a metric collection agent. Learn more at bosun.org. Buildin

Bosun 3.3k Aug 9, 2022
Open source framework for processing, monitoring, and alerting on time series data

Kapacitor Open source framework for processing, monitoring, and alerting on time series data Installation Kapacitor has two binaries: kapacitor – a CL

InfluxData 2.1k Aug 3, 2022
Simple logger for Go programs. Allows custom formats for messages.

go-logger A simple go logger for easy logging in your programs. Allows setting custom format for messages. Preview Install go get github.com/apsdehal/

Amanpreet Singh 276 Jun 14, 2022
So you always leave a note

jWalterWeatherman Seamless printing to the terminal (stdout) and logging to a io.Writer (file) that’s as easy to use as fmt.Println. Graphic by JonnyE

Steve Francia 238 Aug 4, 2022
Parametrized JSON logging library in Golang which lets you obfuscate sensitive data and marshal any kind of content.

Noodlog Summary Noodlog is a Golang JSON parametrized and highly configurable logging library. It allows you to: print go structs as JSON messages; pr

Gyoza Tech 37 Apr 19, 2022
Pixie gives you instant visibility by giving access to metrics, events, traces and logs without changing code.

Pixie gives you instant visibility by giving access to metrics, events, traces and logs without changing code.

Pixie Labs 3.7k Aug 10, 2022
Gowl is a process management and process monitoring tool at once. An infinite worker pool gives you the ability to control the pool and processes and monitor their status.

Gowl is a process management and process monitoring tool at once. An infinite worker pool gives you the ability to control the pool and processes and monitor their status.

Hamed Yousefi 33 Aug 11, 2022
ChangeTower is intended to help you watch changes in webpages and get notified of any changes written in Go

ChangeTower is intended to help you watch changes in webpages and get notified of any changes written in Go

The Cats 32 Jul 6, 2022
You can send massage to Discord, Slack and Telegram

introduction This package divided into three different packages which includes Telegram, Slack and Discord. Let's begin with Discord Discord To use di

Amir Salehi 0 Dec 7, 2021
Time based rotating file writer

cronowriter This is a simple file writer that it writes message to the specified format path. The file path is constructed based on current date and t

Yuta UEKUSA 47 Feb 8, 2022
The Prometheus monitoring system and time series database.

Prometheus Visit prometheus.io for the full documentation, examples and guides. Prometheus, a Cloud Native Computing Foundation project, is a systems

Prometheus 43.8k Aug 15, 2022
Visualise Go program GC trace data in real time

This project is no longer maintained I'm sorry but I do not have the bandwidth to maintain this tool. Please do not send issues or PRs. Thank you. gcv

Dave Cheney 1.1k Aug 11, 2022
gosivy - Real-time visualization tool for Go process metrics

Gosivy tracks Go process's metrics and plot their evolution over time right into your terminal, no matter where it's running on. It helps you understand how your application consumes the resources.

Ryo Nakao 445 Aug 3, 2022
List files and their creation, modification and access time on android

andfind List files and their access, modification and creation date on a Android

Tek 2 Jan 5, 2022