本文整理汇总了Golang中datastore/storage.Engine.Path方法的典型用法代码示例。如果您正苦于以下问题:Golang Engine.Path方法的具体用法?Golang Engine.Path怎么用?Golang Engine.Path使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类datastore/storage.Engine
的用法示例。
在下文中一共展示了Engine.Path方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: benchmarkDbCommon
func benchmarkDbCommon(db storage.Engine, c Config) {
fmt.Printf("################ Benchmarking: %s\n", db.Name())
start := time.Now()
count := 0
for p := c.points; p > 0; {
c := writeBatch(db, &c)
count += c
p -= c
}
d := time.Now().Sub(start)
fmt.Printf("Writing %d points in batches of %d points took %s (%f microsecond per point)\n",
count,
c.batch,
d,
float64(d.Nanoseconds())/1000.0/float64(count),
)
timeQuerying(db, c.series)
fmt.Printf("Size: %s\n", getSize(db.Path()))
queryAndDelete(db, c.points, c.series)
timeQuerying(db, c.series)
fmt.Printf("Size: %s\n", getSize(db.Path()))
start = time.Now()
count = 0
for p := c.points / 2; p > 0; {
c := writeBatch(db, &c)
count += c
p -= c
}
d = time.Now().Sub(start)
fmt.Printf("Writing %d points in batches of %d points took %s (%f microsecond per point)\n",
count,
c.batch,
d,
float64(d.Nanoseconds())/1000.0/float64(count),
)
fmt.Printf("Size: %s\n", getSize(db.Path()))
}