Comments (6)
Example fields from perf.
https://perf.golang.org/search?q=upload:20200212.6
base by goarch goos suite tip
from goperf.
// +build ignore
package main
import (
"encoding/json"
"fmt"
"log"
"runtime"
"github.com/shirou/gopsutil/cpu"
"github.com/shirou/gopsutil/host"
"github.com/shirou/gopsutil/load"
"github.com/shirou/gopsutil/mem"
)
func main() {
dump("go", map[string]string{
"goos": runtime.GOOS,
"goarch": runtime.GOARCH,
})
// Host
host, err := host.Info()
if err != nil {
log.Fatal(err)
}
dump("host", host)
// Load
load, err := load.Avg()
if err != nil {
log.Fatal(err)
}
dump("load", load)
// Memory
vmem, err := mem.VirtualMemory()
if err != nil {
log.Fatal(err)
}
dump("virtual memory", vmem)
// CPU
cpus, err := cpu.Info()
if err != nil {
log.Fatal(err)
}
for _, info := range cpus {
dump("cpu", info)
}
}
func dump(title string, v interface{}) {
fmt.Println("#### " + title)
fmt.Println("```json")
out, err := json.MarshalIndent(v, "", "\t")
if err != nil {
log.Fatal(err)
}
fmt.Println(string(out))
fmt.Println("```")
}
from goperf.
go
{
"goarch": "amd64",
"goos": "darwin"
}
host
{
"hostname": "michaelmcloughlin-C02V60MVHV2T",
"uptime": 184323,
"bootTime": 1581787497,
"procs": 478,
"os": "darwin",
"platform": "darwin",
"platformFamily": "Standalone Workstation",
"platformVersion": "10.15.3",
"kernelVersion": "19.3.0",
"kernelArch": "x86_64",
"virtualizationSystem": "",
"virtualizationRole": "",
"hostid": "a8dde75c-cd97-3c37-b35d-1070cc50d2ce"
}
load
{
"load1": 1.73828125,
"load5": 2.23583984375,
"load15": 2.87158203125
}
virtual memory
{
"total": 17179869184,
"available": 6638567424,
"used": 10541301760,
"usedPercent": 61.35845184326172,
"free": 283410432,
"active": 6316961792,
"inactive": 6355156992,
"wired": 3283636224,
"laundry": 0,
"buffers": 0,
"cached": 0,
"writeback": 0,
"dirty": 0,
"writebacktmp": 0,
"shared": 0,
"slab": 0,
"sreclaimable": 0,
"sunreclaim": 0,
"pagetables": 0,
"swapcached": 0,
"commitlimit": 0,
"committedas": 0,
"hightotal": 0,
"highfree": 0,
"lowtotal": 0,
"lowfree": 0,
"swaptotal": 0,
"swapfree": 0,
"mapped": 0,
"vmalloctotal": 0,
"vmallocused": 0,
"vmallocchunk": 0,
"hugepagestotal": 0,
"hugepagesfree": 0,
"hugepagesize": 0
}
cpu
{
"cpu": 0,
"vendorId": "GenuineIntel",
"family": "6",
"model": "142",
"stepping": 9,
"physicalId": "",
"coreId": "",
"cores": 2,
"modelName": "Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz",
"mhz": 3500,
"cacheSize": 256,
"flags": [
"fpu",
"vme",
"...",
"rdtscp",
"tsci"
],
"microcode": ""
}
from goperf.
go
{
"goarch": "amd64",
"goos": "linux"
}
host
{
"hostname": "7d0470f021f6",
"uptime": 86479,
"bootTime": 1581885154,
"procs": 3,
"os": "linux",
"platform": "ubuntu",
"platformFamily": "debian",
"platformVersion": "18.04",
"kernelVersion": "4.19.76-linuxkit",
"kernelArch": "x86_64",
"virtualizationSystem": "docker",
"virtualizationRole": "guest",
"hostid": "bd144dd7-0000-0000-8063-4f0612546e9c"
}
load
{
"load1": 0.26,
"load5": 0.09,
"load15": 0.02
}
virtual memory
{
"total": 2086522880,
"available": 1642315776,
"used": 310550528,
"usedPercent": 14.883638755018108,
"free": 1342459904,
"active": 450154496,
"inactive": 218472448,
"wired": 0,
"laundry": 0,
"buffers": 62005248,
"cached": 371507200,
"writeback": 0,
"dirty": 139264,
"writebacktmp": 0,
"shared": 909312,
"slab": 49291264,
"sreclaimable": 27029504,
"sunreclaim": 22261760,
"pagetables": 2252800,
"swapcached": 0,
"commitlimit": 2116997120,
"committedas": 3019165696,
"hightotal": 0,
"highfree": 0,
"lowtotal": 0,
"lowfree": 0,
"swaptotal": 1073737728,
"swapfree": 1073737728,
"mapped": 143167488,
"vmalloctotal": 35184372087808,
"vmallocused": 0,
"vmallocchunk": 0,
"hugepagestotal": 0,
"hugepagesfree": 0,
"hugepagesize": 2097152
}
cpu
{
"cpu": 0,
"vendorId": "GenuineIntel",
"family": "6",
"model": "142",
"stepping": 9,
"physicalId": "0",
"coreId": "0",
"cores": 1,
"modelName": "Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz",
"mhz": 3500,
"cacheSize": 4096,
"flags": [
"fpu",
"vme",
"...",
"xsaveopt",
"arat"
],
"microcode": ""
}
cpu
{
"cpu": 1,
"vendorId": "GenuineIntel",
"family": "6",
"model": "142",
"stepping": 9,
"physicalId": "1",
"coreId": "0",
"cores": 1,
"modelName": "Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz",
"mhz": 3500,
"cacheSize": 4096,
"flags": [
"fpu",
"vme",
"...",
"xsaveopt",
"arat"
],
"microcode": ""
}
from goperf.
Current status on linux:
$ go run ./cmd/benchcfg/ true
host-hostname: mbm-Tower
host-uptime: 290h54m34s
host-boot-time: 2020-02-07 18:16:21 -0800 PST
host-num-procs: 496
host-os: linux
host-platform: ubuntu
host-platform-family: debian
host-platform-version: 18.04
host-kernel-version: 4.15.0-76-generic
host-kernel-arch: x86_64
host-virt-system: kvm
host-virt-role: host
mem-total: 124.58 GiB
mem-available: 112.56 GiB
mem-used: 10.99 GiB
mem-used-percent: 8.8%
mem-free: 23.31 GiB
load-avg1: 1.01
load-avg5: 1.18
load-avg15: 1.16
on Mac:
$ go run ./cmd/benchcfg/ true
host-hostname: michaelmcloughlin-C02V60MVHV2T
host-uptime: 107h49m22s
host-boot-time: 2020-02-15 12:25:10 -0500 EST
host-num-procs: 470
host-os: darwin
host-platform: darwin
host-platform-family: Standalone Workstation
host-platform-version: 10.15.3
host-kernel-version: 19.3.0
host-kernel-arch: x86_64
host-virt-system:
host-virt-role:
mem-total: 16 GiB
mem-available: 6.16 GiB
mem-used: 9.84 GiB
mem-used-percent: 61.5%
mem-free: 1.46 GiB
load-avg1: 1.55859375
load-avg5: 2.1279296875
load-avg15: 2.29736328125
from goperf.
Call this done.
from goperf.
Related Issues (20)
- dashboard: benchmark graphs load too slowly HOT 3
- dashboard: fix commit ordering HOT 4
- db: commit positions table
- changes: check for detection of known performance diffs HOT 2
- dashboard: comparison view
- dashboard: display red/green improvement direction on significant changes view
- dashboard: benchmark graphs by commit index
- dashboard: google analytics
- runner: frequency pinning HOT 1
- infra: Network Inter Zone Egress charges
- worker: panic in snapshot download
- ingest: batch results insert
- dashboard: about page
- dashboard: titles
- dashboard: index page
- dashboard: miscellaneous tweaks HOT 1
- db: use points table
- infra,dashboard: release preparation
- changes: easy way to produce test cases
- db: check stability of commit index HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goperf.