hsperfdata

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2016 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Overview

* Copyright (C) 2016 Yasumasa Suenaga * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHSPerfDataPath

func GetHSPerfDataPath(pid string) (string, error)

func New

func New(base mb.BaseMetricSet) (mb.MetricSet, error)

New create a new instance of the MetricSet Part of new is also setting up the configuration by processing additional configuration entries if needed.

Types

type HSPerfData

type HSPerfData struct {
	Prologue PerfDataPrologue

	ForceCachedEntryName map[string]int
	// contains filtered or unexported fields
}

func (*HSPerfData) ReadAllEntry

func (this *HSPerfData) ReadAllEntry(f *os.File) ([]PerfDataEntry, error)

func (*HSPerfData) ReadCachedEntry

func (this *HSPerfData) ReadCachedEntry(f *os.File) ([]PerfDataEntry, error)

func (*HSPerfData) ReadPrologue

func (this *HSPerfData) ReadPrologue(f *os.File) error

type MetricSet

type MetricSet struct {
	mb.BaseMetricSet
	// contains filtered or unexported fields
}

MetricSet type defines all fields of the MetricSet As a minimum it must inherit the mb.BaseMetricSet fields, but can be extended with additional entries. These variables can be used to persist data or configuration between multiple fetch calls.

func (*MetricSet) Fetch

func (m *MetricSet) Fetch() (common.MapStr, error)

Fetch methods implements the data gathering and data conversion to the right format It returns the event which is then forward to the output. In case of an error, a descriptive error must be returned.

type PerfDataEntry

type PerfDataEntry struct {
	EntryLength     int32
	NameOffset      int32
	VectorLength    int32
	DataType        int8
	Flags           int8
	DataUnits       int8
	DataVariability int8
	DataOffset      int32
	EntryName       string
	StringValue     string
	LongValue       int64

	FileOffset int64
}

type PerfDataPrologue

type PerfDataPrologue struct {
	Magic        uint32
	ByteOrder    int8
	MajorVersion int8
	MinorVersion int8
	Accessible   int8
	Used         int32
	Overflow     int32
	ModTimeStamp int64
	EntryOffset  int32
	NumEntries   int32
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL