mirror of
https://github.com/ClusterCockpit/cc-metric-store.git
synced 2025-09-14 04:33:01 +02:00
Fix names and add missing methods
This commit is contained in:
@@ -187,7 +187,7 @@ func reorder(buf, prefix []byte) []byte {
|
||||
|
||||
// Decode lines using dec and make write calls to the MemoryStore.
|
||||
// If a line is missing its cluster tag, use clusterDefault as default.
|
||||
func decodeLine(memoryStore *memstore.MemoryStore, dec *lineprotocol.Decoder, clusterDefault string) error {
|
||||
func DecodeLine(memoryStore *memstore.MemoryStore, dec *lineprotocol.Decoder, clusterDefault string) error {
|
||||
// Reduce allocations in loop:
|
||||
t := time.Now()
|
||||
metric, metricBuf := types.Metric{}, make([]byte, 0, 16)
|
||||
|
@@ -139,7 +139,7 @@ func BenchmarkLineprotocolDecoder(b *testing.B) {
|
||||
dec := lineprotocol.NewDecoderWithBytes(data)
|
||||
|
||||
b.StartTimer()
|
||||
if err := decodeLine(memoryStore, dec, "ctest"); err != nil {
|
||||
if err := DecodeLine(memoryStore, dec, "ctest"); err != nil {
|
||||
b.Fatal(err)
|
||||
}
|
||||
b.StopTimer()
|
||||
|
Reference in New Issue
Block a user