示例#1
0
// Dump converts this SampleKey into a DTO for use in serialization purposes.
func (s *SampleKey) Dump(d *dto.SampleKey) {
	d.Reset()
	fp := &dto.Fingerprint{}
	dumpFingerprint(fp, s.Fingerprint)

	d.Fingerprint = fp
	d.Timestamp = indexable.EncodeTime(s.FirstTimestamp)
	d.LastTimestamp = proto.Int64(s.LastTimestamp.Unix())
	d.SampleCount = proto.Uint32(s.SampleCount)
}
示例#2
0
func (l *dtoSampleKeyList) Give(v *dto.SampleKey) bool {
	v.Reset()

	return l.l.Give(v)
}