Schema for metric store

This commit is contained in:
Aditya Ujeniya
2025-10-23 17:58:17 +02:00
parent bc43c844fc
commit f34e10cfd9
5 changed files with 102 additions and 181 deletions

View File

@@ -10,6 +10,7 @@ import (
"context"
"encoding/json"
"errors"
"fmt"
"os"
"os/signal"
"runtime"
@@ -386,6 +387,8 @@ func (m *MemoryStore) Read(selector util.Selector, metric string, from, to, reso
n, data := 0, make([]schema.Float, (to-from)/minfo.Frequency+1)
fmt.Printf("Requested From : %d, To: %d\n", from, to)
err := m.root.findBuffers(selector, minfo.offset, func(b *buffer) error {
cdata, cfrom, cto, err := b.read(from, to, data)
if err != nil {