MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / cmp_bench

Function cmp_bench

crates/bench/hyper_cmp.py:124–134  ·  view source on GitHub ↗
(stat: Stat)

Source from the content-addressed store, hash-verified

122
123# Check Sqlite VS Spacetime
124def cmp_bench(stat: Stat):
125 winner, delta = pick_winner(stat.spacetime, stat.sqlite, "Spacetime", "Sqlite")
126
127 header = ["Stat", "Sqlite", "Spacetime", "Delta"]
128
129 rows = []
130 for (k, v) in stat.sqlite.items():
131 rows.append([k, v, stat.spacetime[k], round(stat.spacetime[k] - v, 2)])
132
133 bar = dict(SpacetimeDB=stat.spacetime["mean"], Sqlite=stat.sqlite["mean"])
134 return Report("Comparing Sqlite VS Spacetime Winner: **%s**" % winner, header, bar, rows)
135
136
137# Check the progress of Spacetime between branches / PR

Callers 1

hyper_cmp.pyFile · 0.85

Calls 3

pick_winnerFunction · 0.85
ReportClass · 0.85
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…