mohae/joefriday · sysinfo.go
go logo
func BenchSysinfoLoadAvgDeserializeJSON(b *testing.B) {
	var l *load.LoadAvg
	tmp, _ := ljson.Get()
	b.ResetTimer()
	for i := 0; i < b.N; i++ {
		l, _ = ljson.Deserialize(tmp)
	}
	_ = l
}
Similar code snippets
1.
mohae/joefriday · system.go
Match rating: 83.29% · See similar code snippets
go logo
func BenchSystemLoadAvgDeserializeJSON(b *testing.B) {
	var l loadavg.LoadAvg
	p, _ := ljson.NewProfiler()
	tmp, _ := p.Get()
	b.ResetTimer()
	for i := 0; i < b.N; i++ {
		l, _ = ljson.Deserialize(tmp)
	}
	_ = l
}
2.
mohae/joefriday · sysinfo.go
Match rating: 77.4% · See similar code snippets
go logo
func BenchSysinfoLoadAvgDeserializeFB(b *testing.B) {
	var l *load.LoadAvg
	tmp, _ := lfb.Get()
	b.ResetTimer()
	for i := 0; i < b.N; i++ {
		l = lfb.Deserialize(tmp)
	}
	_ = l
}
3.
mohae/joefriday · system.go
Match rating: 73.02% · See similar code snippets
go logo
func BenchSystemLoadAvgDeserializeFB(b *testing.B) {
	var l loadavg.LoadAvg
	p, _ := lfb.NewProfiler()
	tmp, _ := p.Get()
	b.ResetTimer()
	for i := 0; i < b.N; i++ {
		l = lfb.Deserialize(tmp)
	}
	_ = l
}
4.
mohae/joefriday · sysinfo.go
Match rating: 63.25% · See similar code snippets
go logo
func BenchSysinfoLoadAvgSerializeFB(b *testing.B) {
	var tmp []byte
	l := &load.LoadAvg{}
	l.Get()
	b.ResetTimer()
	for i := 0; i < b.N; i++ {
		tmp = lfb.Serialize(l)
	}
	_ = tmp
}
5.
mohae/joefriday · sysinfo.go
Match rating: 62.24% · See similar code snippets
go logo
func BenchSysinfoLoadAvgGet(b *testing.B) {
	l := &load.LoadAvg{}
	for i := 0; i < b.N; i++ {
		l.Get()
	}
	_ = l
}
6.
mohae/joefriday · loadavg_unix.go
Match rating: 55.99% · See similar code snippets
go logo
func Deserialize(p []byte) *load.LoadAvg {
	lF := structs.GetRootAsLoadAvg(p, 0)
	l := &load.LoadAvg{}
	l.Timestamp = lF.Timestamp()
	l.One = lF.One()
	l.Five = lF.Five()
	l.Fifteen = lF.Fifteen()
	return l
}
7.
mohae/joefriday · sysinfo.go
Match rating: 54.73% · See similar code snippets
go logo
func BenchSysinfoMemInfoDeserializeJSON(b *testing.B) {
	var m *mem.MemInfo
	tmp, _ := mjson.Get()
	b.ResetTimer()
	for i := 0; i < b.N; i++ {
		m, _ = mjson.Deserialize(tmp)
	}
	_ = m
}
8.
mohae/joefriday · sysinfo.go
Match rating: 54.62% · See similar code snippets
go logo
func BenchSysinfoUptimeDeserializeJSON(b *testing.B) {
	var u *uptime.Uptime
	tmp, _ := ujson.Get()
	b.ResetTimer()
	for i := 0; i < b.N; i++ {
		u, _ = ujson.Deserialize(tmp)
	}
	_ = u
}
9.
mohae/joefriday · system.go
Match rating: 54.37% · See similar code snippets
go logo
func BenchSystemOSDeserializeJSON(b *testing.B) {
	var o *os.OS
	p, _ := osjson.NewProfiler()
	tmp, _ := p.Get()
	b.ResetTimer()
	for i := 0; i < b.N; i++ {
		o, _ = osjson.Deserialize(tmp)
	}
	_ = o
}
10.
mohae/joefriday · mem.go
Match rating: 53.54% · See similar code snippets
go logo
func BenchMemInfoDeserializeJSON(b *testing.B) {
	var inf *meminfo.Info
	p, _ := mjson.NewProfiler()
	tmp, _ := p.Get()
	b.ResetTimer()
	for i := 0; i < b.N; i++ {
		inf, _ = mjson.Deserialize(tmp)
	}
	_ = inf
}