Documentation
¶
Index ¶
- func BenchBasicMemInfo() []benchutil.Bench
- func BenchCPUInfo(n int) []benchutil.Bench
- func BenchMemInfo() []benchutil.Bench
- func BenchMessage(l int) []benchutil.Bench
- func BenchRedditAccount() []benchutil.Bench
- type AccountData
- type BasicMemInfo
- type CPU
- type CPUInfo
- type MemInfo
- type Message
- type RedditAccount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BenchBasicMemInfo ¶
BenchBasicMemInfo runs the BasicMemInfo benches for Marshal/Unmarshal.
func BenchCPUInfo ¶
BenchCPUInfo runs the CPUInfo benches for Marshal/Unmarshal.
func BenchMemInfo ¶
BenchMemInfo runs the MemInfo benches for Marshal/Unmarshal.
func BenchMessage ¶
BenchMessage runs the MemInfo benches for Marshal/Unmarshal.
func BenchRedditAccount ¶
BenchRedditAccount runs the MemInfo benches for Marshal/Unmarshal.
Types ¶
type AccountData ¶
type AccountData struct {
CommentKarma int64 `json:"comment_karma"`
HasMail bool `json:"has_mail"`
HasModMail bool `json:"has_mod_mail"`
ID string `json:"id"`
InboxCount int64 `json:"inbox_count"`
IsFriend bool `json:"is_friend"`
IsGold bool `json:"is_gold"`
LinkKarma int64 `json:"link_karma"`
ModHash string `json:"mod_hash"`
Name string `json:"name"`
Over18 bool `json:"over_18"`
}
func (*AccountData) MarshalJSON ¶
func (mj *AccountData) MarshalJSON() ([]byte, error)
func (*AccountData) MarshalJSONBuf ¶
func (mj *AccountData) MarshalJSONBuf(buf fflib.EncodingBuffer) error
func (*AccountData) UnmarshalJSON ¶
func (uj *AccountData) UnmarshalJSON(input []byte) error
func (*AccountData) UnmarshalJSONFFLexer ¶
func (uj *AccountData) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error
type BasicMemInfo ¶
type BasicMemInfo struct {
MemTotal int64 `json:"mem_total"`
MemFree int64 `json:"mem_free"`
MemAvailable int64 `json:"mem_available"`
Buffers int64 `json:"buffers"`
Cached int64 `json:"cached"`
SwapCached int64 `json:"swap_cached"`
SwapTotal int64 `json:"swap_total"`
SwapFree int64 `json:"swap_fred"`
}
func PrepareBasicMemInfoData ¶
func PrepareBasicMemInfoData(data []shared.ShBasicMemInfo) []BasicMemInfo
PrepareBasicMemInfoData generates the ffjson version of the data.
func (*BasicMemInfo) MarshalJSON ¶
func (mj *BasicMemInfo) MarshalJSON() ([]byte, error)
func (*BasicMemInfo) MarshalJSONBuf ¶
func (mj *BasicMemInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error
func (*BasicMemInfo) UnmarshalJSON ¶
func (uj *BasicMemInfo) UnmarshalJSON(input []byte) error
func (*BasicMemInfo) UnmarshalJSONFFLexer ¶
func (uj *BasicMemInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error
type CPU ¶
type CPU struct {
Processor int16 `json:"processor"`
VendorID string `json:"vendor_id"`
CPUFamily string `json:"cpu_family"`
Model string `json:"model"`
ModelName string `json:"model_name"`
Stepping string `json:"stepping"`
Microcode string `json:"microcode"`
CPUMHz float32 `json:"cpu_mhz"`
CacheSize string `json:"cache_size"`
PhysicalID int16 `json:"physical_id"`
Siblings int16 `json:"siblings"`
CoreID int16 `json:"core_id"`
CPUCores int16 `json:"cpu_cores"`
ApicID int16 `json:"apicid"`
InitialApicID int16 `json:"initial_apicid"`
FPU string `json:"fpu"`
FPUException string `json:"fpu_exception"`
CPUIDLevel string `json:"cpuid_level"`
WP string `json:"wp"`
Flags string `json:"flags"`
BogoMIPS float32 `json:"bogomips"`
CLFlushSize string `json:"clflush_size"`
CacheAlignment string `json:"cache_alignment"`
AddressSizes string `json:"address_sizes"`
PowerManagement string `json:"power_management"`
}
func (*CPU) MarshalJSON ¶
func (*CPU) MarshalJSONBuf ¶
func (mj *CPU) MarshalJSONBuf(buf fflib.EncodingBuffer) error
func (*CPU) UnmarshalJSON ¶
func (*CPU) UnmarshalJSONFFLexer ¶
type CPUInfo ¶
type CPUInfo struct {
CPUs []CPU `json:"cpu"`
}
func PrepareCPUInfoData ¶
PrepareCPUInfoData generates the ffjson version of the data.
func (*CPUInfo) MarshalJSON ¶
func (*CPUInfo) MarshalJSONBuf ¶
func (mj *CPUInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error
func (*CPUInfo) UnmarshalJSON ¶
func (*CPUInfo) UnmarshalJSONFFLexer ¶
type MemInfo ¶
type MemInfo struct {
MemTotal int64 `json:"mem_total"`
MemFree int64 `json:"mem_free"`
MemAvailable int64 `json:"mem_available"`
Buffers int64 `json:"buffers"`
Cached int64 `json:"cached"`
SwapCached int64 `json:"swap_cached"`
Active int64 `json:"active"`
Inactive int64 `json:"inactive"`
ActiveAnon int64 `json:"active_anon"`
InactiveAnon int64 `json:"inactive_anon"`
ActiveFile int64 `json:"active_file"`
InactiveFile int64 `json:"inactive_file"`
Unevictable int64 `json:"unevictable"`
Mlocked int64 `json:"mlocked"`
SwapTotal int64 `json:"swap_total"`
SwapFree int64 `json:"swap_free"`
Dirty int64 `json:"dirty"`
Writeback int64 `json:"writeback"`
AnonPages int64 `json:"anon_pages"`
Mapped int64 `json:"mapped"`
Shmem int64 `json:"sh_mem"`
Slab int64 `json:"slab"`
SReclaimable int64 `json:"s_reclaimable"`
SUnreclaim int64 `json:"s_unreclaim"`
KernelStack int64 `json:"kernel_stack"`
NFSUnstable int64 `json:"nfs_unstable"`
Bounce int64 `json:"bounce"`
WritebackTmp int64 `json:"writeback_tmp"`
CommitLimit int64 `json:"commit_limit"`
VmallocTotal int64 `json:"vmalloc_total"`
VmallocUsed int64 `json:"vmalloc_used"`
VmallocChunk int64 `json:"vmalloc_chunked"`
HardwareCorrupted int64 `json:"hardware_corrupted"`
AnonHugePages int64 `json:"anon_huge_pages"`
HugePagesTotal int64 `json:"huge_pages_total"`
HugePagesFree int64 `json:"huge_pages_free"`
HugePagesRsvd int64 `json:"huge_pages_rsvd"`
Hugepagesize int64 `json:"huge_pages_size"`
DirectMap4k int64 `json:"direct_map_4k"`
DirectMap2M int64 `json:"direct_map_2m"`
}
func PrepareMemInfoData ¶
PrepareMemInfoData generates the ffjson version of the data.
func (*MemInfo) MarshalJSON ¶
func (*MemInfo) MarshalJSONBuf ¶
func (mj *MemInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error
func (*MemInfo) UnmarshalJSON ¶
func (*MemInfo) UnmarshalJSONFFLexer ¶
type Message ¶
type Message struct {
ID []byte `json:"id"`
DestID uint32 `json:"dest_id"`
Type int8 `json:"type"`
Kind int16 `json:"kind"`
Data []byte `json:"data"`
}
func PrepareMessageData ¶
PrepareMessageData generates the ffjson version of the data.
func (*Message) MarshalJSON ¶
func (*Message) MarshalJSONBuf ¶
func (mj *Message) MarshalJSONBuf(buf fflib.EncodingBuffer) error
func (*Message) UnmarshalJSON ¶
func (*Message) UnmarshalJSONFFLexer ¶
type RedditAccount ¶
type RedditAccount struct {
ID string `json:"id"`
Name string `json:"name"`
Kind string `json:"kind"`
Data AccountData `json:"data"`
}
func PrepareRedditAccountData ¶
func PrepareRedditAccountData(data []shared.ShRedditAccount) []RedditAccount
PrepareRedditAccountData generates the ffjson version of the data.
func (*RedditAccount) MarshalJSON ¶
func (mj *RedditAccount) MarshalJSON() ([]byte, error)
func (*RedditAccount) MarshalJSONBuf ¶
func (mj *RedditAccount) MarshalJSONBuf(buf fflib.EncodingBuffer) error
func (*RedditAccount) UnmarshalJSON ¶
func (uj *RedditAccount) UnmarshalJSON(input []byte) error
func (*RedditAccount) UnmarshalJSONFFLexer ¶
func (uj *RedditAccount) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error
Click to show internal directories.
Click to hide internal directories.