Documentation
¶
Index ¶
- func ProfileTypeFromDBModel(ptype ProfileType) (profile.ProfileType, error)
- type Config
- type ProfileKey
- type ProfileType
- type ProfilesWriter
- type ProfilesWriterWrapper
- type SamplesWriter
- type Storage
- func (st *Storage) FindProfileIDs(ctx context.Context, params *storage.FindProfilesParams) (pids []profile.ID, err error)
- func (st *Storage) FindProfiles(ctx context.Context, params *storage.FindProfilesParams) (metas []profile.Meta, err error)
- func (st *Storage) ListProfiles(ctx context.Context, pid []profile.ID) (storage.ProfileList, error)
- func (st *Storage) ListServices(ctx context.Context) (services []string, err error)
- func (st *Storage) WriteProfile(ctx context.Context, params *storage.WriteProfileParams, r io.Reader) (profile.Meta, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProfileTypeFromDBModel ¶
func ProfileTypeFromDBModel(ptype ProfileType) (profile.ProfileType, error)
Types ¶
type ProfileKey ¶
type ProfileKey [12]byte
func NewProfileKey ¶
func NewProfileKey(t time.Time) (pk ProfileKey)
func (*ProfileKey) Scan ¶
func (pk *ProfileKey) Scan(src interface{}) error
func (ProfileKey) String ¶
func (pk ProfileKey) String() string
type ProfileType ¶
type ProfileType uint8
const ( TypeCPU ProfileType = 1 TypeHeap ProfileType = 2 TypeBlock ProfileType = 3 TypeMutex ProfileType = 4 TypeGoroutine ProfileType = 5 TypeThreadcreate ProfileType = 6 TypeOther ProfileType = 100 )
Profile types supported by ClickHouse writer. Must match with values defined in `pprof_profiles.profile_type` SQL enum.
func ProfileTypeToDBModel ¶
func ProfileTypeToDBModel(ptype profile.ProfileType) (ProfileType, error)
type ProfilesWriter ¶
type ProfilesWriter interface {
WriteProfile(ctx context.Context, pk ProfileKey, ptype ProfileType, createdAt time.Time, params *storage.WriteProfileParams) error
}
func NewProfilesWriter ¶
func NewProfilesWriter(logger *log.Logger, db *sql.DB) ProfilesWriter
type ProfilesWriterWrapper ¶
type ProfilesWriterWrapper func(ProfilesWriter) ProfilesWriter
type SamplesWriter ¶
type SamplesWriter interface {
WriteSamples(ctx context.Context, pk ProfileKey, samples []*pprofProfile.Sample, sampleTypes []*pprofProfile.ValueType) error
}
func NewSamplesWriter ¶
func NewSamplesWriter(logger *log.Logger, db *sql.DB) SamplesWriter
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func NewStorage ¶
func NewStorage(logger *log.Logger, db *sql.DB, profilesWriter ProfilesWriter, samplesWriter SamplesWriter) (*Storage, error)
func (*Storage) FindProfileIDs ¶
func (*Storage) FindProfiles ¶
func (*Storage) ListProfiles ¶
func (*Storage) ListServices ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.