River: Add some timer.

opt-result
Pierre-Antoine 2026-06-19 09:23:42 +02:00
parent 32e7413aad
commit 8255fc3c1b
1 changed files with 4 additions and 1 deletions

View File

@ -20,7 +20,7 @@ import logging
import itertools
import numpy as np
from tools import flatten
from tools import flatten, timer
from functools import reduce
from datetime import datetime
@ -62,9 +62,11 @@ class Profile(SQLSubModel):
self._data[timestamp][key] = data
@timer
def get_ts(self, timestamp):
return self._data[timestamp]
@timer
def get_key(self, key):
res = list(
map(lambda ts: self._data[ts][key],
@ -72,6 +74,7 @@ class Profile(SQLSubModel):
)
return res
@timer
def get_ts_key(self, timestamp, key):
if timestamp in self._data:
if key in self._data[timestamp]: