当前位置: 首页>>代码示例>>Golang>>正文


Golang Point.GetTimestampInMicroseconds方法代码示例

本文整理汇总了Golang中protocol.Point.GetTimestampInMicroseconds方法的典型用法代码示例。如果您正苦于以下问题:Golang Point.GetTimestampInMicroseconds方法的具体用法?Golang Point.GetTimestampInMicroseconds怎么用?Golang Point.GetTimestampInMicroseconds使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在protocol.Point的用法示例。


在下文中一共展示了Point.GetTimestampInMicroseconds方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: UpdateRange

func (self *PointRange) UpdateRange(point *protocol.Point) {
	timestamp := *point.GetTimestampInMicroseconds()
	if timestamp < self.startTime {
		self.startTime = timestamp
	}
	if timestamp > self.endTime {
		self.endTime = timestamp
	}
}
开发者ID:hyc,项目名称:influxdb,代码行数:9,代码来源:engine.go

示例2: AggregatePoint

func (self *TimestampAggregator) AggregatePoint(series string, group interface{}, p *protocol.Point) error {
	timestamps := self.timestamps[series]
	if timestamps == nil {
		timestamps = make(map[interface{}]int64)
		self.timestamps[series] = timestamps
	}
	if self.duration != nil {
		timestamps[group] = *p.GetTimestampInMicroseconds() / *self.duration * *self.duration
	} else {
		timestamps[group] = *p.GetTimestampInMicroseconds()
	}
	return nil
}
开发者ID:rudrapranay,项目名称:influxdb,代码行数:13,代码来源:aggregator.go

示例3: getTimestampFromPoint

func getTimestampFromPoint(window time.Duration, point *protocol.Point) int64 {
	multiplier := int64(window / time.Microsecond)
	return *point.GetTimestampInMicroseconds() / int64(multiplier) * int64(multiplier)
}
开发者ID:ronaldevers,项目名称:influxdb,代码行数:4,代码来源:engine.go

示例4: getTimestampFromPoint

func (self *QueryEngine) getTimestampFromPoint(point *protocol.Point) int64 {
	return self.getTimestampBucket(uint64(*point.GetTimestampInMicroseconds()))
}
开发者ID:hyc,项目名称:influxdb,代码行数:3,代码来源:engine.go

示例5: getTimestampFromPoint

func (self *QueryEngine) getTimestampFromPoint(point *protocol.Point) int64 {
	multiplier := uint64(*self.duration)
	timestampNanoseconds := uint64(*point.GetTimestampInMicroseconds() * 1000)
	return int64(timestampNanoseconds / multiplier * multiplier / 1000)
}
开发者ID:kennylixi,项目名称:influxdb,代码行数:5,代码来源:engine.go


注:本文中的protocol.Point.GetTimestampInMicroseconds方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。