Skip to content

Commit

Permalink
Timeseries
Browse files Browse the repository at this point in the history
  • Loading branch information
TeachMeTW committed Oct 14, 2024
1 parent a7884e5 commit 196e410
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions emission/tests/funcTests/TestFunctionTiming.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import emission.core.timer as ec_timer

# Import the database module for verification
import emission.core.get_database as gdb

import emission.storage.timeseries.builtin_timeseries as bits
builtin_ts = bits.BuiltinTimeSeries(None)
# Define test functions
def test_function_1():
logging.info("Executing test_function_1")
Expand Down Expand Up @@ -67,7 +67,7 @@ def execute_and_time_function(func: t.Callable[[], bool]):
logging.info(f"Function '{function_name}' executed successfully in {elapsed_ms:.2f} ms.")

# Verification: Adjusted Query to Match Document Structure
timeseries_db = gdb.get_timeseries_db()
timeseries_db = builtin_ts.get_timeseries_db(key="stats/dashboard_time")


query = {
Expand Down Expand Up @@ -115,7 +115,7 @@ def execute_and_time_function(func: t.Callable[[], bool]):
logging.error(f"Function '{function_name}' failed after {elapsed_ms:.2f} ms with error: {e}")

# Verification: Adjusted Error Query to Match Document Structure
timeseries_db = gdb.get_timeseries_db()
timeseries_db = builtin_ts.get_timeseries_db(key="stats/dashboard_error")

error_query = {
"metadata.key": "stats/dashboard_error",
Expand Down

0 comments on commit 196e410

Please sign in to comment.