Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
42ac5dc
bench | timeseries: JSON API, Grafana datasource plugin, ci-bench-tim…
Russoul May 6, 2026
2ae71fc
cardano-tracer | timeseries: Sanitise metric name to match our Promet…
Russoul May 7, 2026
d8a40a2
Add `Unit` type to timeseries
Russoul May 7, 2026
5c7ae94
bench | grafana-datasource: error handling, Unit value support
Russoul May 7, 2026
e6c05f0
bench | grafana-datasource: align query API with Prometheus conventions
Russoul May 7, 2026
8cddfa7
bench | timeseries: add List type (Nil/Cons) to Expr and Value
Russoul May 11, 2026
82a3cfb
bench | grafana-datasource: provisioned RTView dashboard; enable RTVi…
Russoul May 11, 2026
0d1b435
bench | timeseries: add RangeVector/Scalar arithmetic; fix typing.txt…
Russoul May 11, 2026
7b9f5ac
bench | timeseries: unit test groundwork; fix parser bug; update gram…
Russoul May 11, 2026
a9a9c2b
timeseries: add comprehensive interpretation tests; fix sum_over_time…
Russoul May 11, 2026
b08dd8b
timeseries: support local name shadowing in the elaborator
Russoul May 11, 2026
74de1e5
timeseries: give the elaborator metric-name awareness for better errors
Russoul May 11, 2026
2b6c848
timeseries: fix epoch parser bug — epoch now correctly produces Times…
Russoul May 11, 2026
07641ec
timeseries elab: suggest similar names in Undefined-name error
Russoul May 11, 2026
43c7f50
grafana-datasource: wire up Grafana time picker to query range
Russoul May 11, 2026
36a3ee6
timeseries: expand elab test suite to ~110 tests
Russoul May 11, 2026
2230219
timeseries: add noncanonical rule for Duration + Duration
Russoul May 11, 2026
9bf21bb
timeseries: add three unambiguous noncanonical arithmetic rules
Russoul May 11, 2026
b9bcf8e
timeseries: align HTTP API and JSON wire format with Prometheus
Russoul May 15, 2026
bdffe25
grafana-datasource: add $__interval step to all dashboard range queries
Russoul May 15, 2026
4372bf3
cardano-profile: introduce 6-dense-timeseries-1h
Russoul May 11, 2026
99c63eb
workbench: fix ps --ppid for macOS compatibility
Russoul May 15, 2026
8632c8b
timeseries: fix hlint warnings (eta reduce, fuse foldr/map, record pa…
Russoul May 15, 2026
39de413
cardano-tracer: add node info/startup/state HTTP endpoints to timeser…
Russoul May 15, 2026
9c2334c
grafana-datasource: add node info/startup/state/uptime query types an…
Russoul May 15, 2026
8f7b13d
grafana-datasource: enable multi-select on node_id variable for panel…
Russoul May 15, 2026
721d01f
cardano-timeseries-io | cardano-tracer: bump version to 1.1.0 and 0.5…
Russoul May 15, 2026
e434089
cardano-timeseries-io | cardano-tracer: fix bugs and style issues fro…
Russoul May 15, 2026
8cbb5bf
cardano-tracer, grafana-datasource: extend series labels, rename node…
Russoul May 28, 2026
d92ac69
cardano-tracer, grafana-datasource: node_name as sole series label; s…
Russoul May 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,176 changes: 1,577 additions & 599 deletions bench/cardano-profile/data/all-profiles-coay.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@
"tracer": {
"rtview": false,
"ekg": false,
"withresources": false
"withresources": false,
"timeseries": false
},
"cluster": null,
"extra_desc": "without cardano-tracer",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@
"tracer": {
"rtview": false,
"ekg": false,
"withresources": false
"withresources": false,
"timeseries": false
},
"extra_desc": "without cardano-tracer",
"suffix": "notrc",
Expand Down
14 changes: 7 additions & 7 deletions bench/cardano-profile/data/test/ci-test-bage.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"filters": [],
"finish_patience": 21,
"last_log_spread_s": 120,
"minimum_chain_density": 2.5e-2,
"minimum_chain_density": 0.025,
"silence_since_last_block_s": 120,
"start_log_spread_s": 120,
"tx_loss_ratio": 2.0e-2,
"tx_loss_ratio": 0.020,
"type": "standard"
},
"cli_args": {
Expand Down Expand Up @@ -119,7 +119,7 @@
"tx_fee": 1000000
},
"genesis": {
"active_slots_coeff": 5.0e-2,
"active_slots_coeff": 0.050,
"alonzo": {
"collateralPercentage": 150,
"costModels": {
Expand Down Expand Up @@ -329,7 +329,7 @@
"pparamsEpoch": 300,
"pparamsOverlays": [],
"shelley": {
"activeSlotsCoeff": 5.0e-2,
"activeSlotsCoeff": 0.050,
"epochLength": 600,
"protocolParams": {
"a0": 0.3,
Expand All @@ -352,7 +352,7 @@
"major": 6,
"minor": 0
},
"rho": 3.0e-3,
"rho": 0.0030,
"tau": 0.2
},
"securityParam": 3,
Expand Down Expand Up @@ -383,8 +383,8 @@
"tracer": {
"ekg": false,
"rtview": false,
"withresources": false
"withresources": false,
"timeseries": false
},
"workloads": []
}

3 changes: 2 additions & 1 deletion bench/cardano-profile/data/test/ci-test-coay/profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@
"tracer": {
"rtview": false,
"ekg": false,
"withresources": false
"withresources": false,
"timeseries": false
},
"cluster": null,
"desc": "Miniature dataset, CI-friendly duration, test scale",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,14 +315,15 @@
"tracer": {
"rtview": false,
"ekg": false,
"withresources": false
"withresources": false,
"timeseries": false
},
"cluster": null,
"desc": "Miniature dataset, CI-friendly duration, test scale",
"name": "ci-test-dense10-coay",
"overlay": {},
"derived": {
"supply_delegated": 1e+16,
"supply_delegated": 1E+16,
"supply_total": 10010000000000000,
"utxo_delegated": 0,
"utxo_generated": 18000,
Expand Down
3 changes: 2 additions & 1 deletion bench/cardano-profile/data/test/default-coay/profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@
"tracer": {
"rtview": false,
"ekg": false,
"withresources": false
"withresources": false,
"timeseries": false
},
"cluster": null,
"name": "default-coay",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,8 @@
"tracer": {
"rtview": false,
"ekg": false,
"withresources": false
"withresources": false,
"timeseries": false
},
"cluster": {
"nomad": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ base =
. P.initCooldown 5
. P.analysisStandard


benchDuration :: Types.Profile -> Types.Profile
benchDuration =
V.timescaleCompressed
Expand Down Expand Up @@ -73,6 +74,7 @@ profilesNoEraMiniature =
ciBench02PlutusV3 = ciBench02 & V.genesisVariantVoltaire
ciBench10Value = ciBench10 & V.genesisVariant300
ciBench10Plutus = ciBench10 & V.genesisVariant300

loop = V.plutusSaturation . V.plutusTypeLoop . P.analysisSizeSmall
loop2024 = V.plutusSaturation . V.plutusTypeLoop2024 . P.analysisSizeSmall
ecdsa = V.plutusDoublePlusSaturation . V.plutusTypeECDSA . P.analysisSizeModerate
Expand All @@ -85,6 +87,7 @@ profilesNoEraMiniature =
, ciBench02Value & P.name "ci-bench-lmdb" . V.valueLocal . P.dreps 0 . P.traceForwardingOn . P.newTracing . P.lmdb . P.ssdDirectory "/tmp"
, ciBench02Value & P.name "ci-bench-lsmt" . V.valueLocal . P.dreps 0 . P.traceForwardingOn . P.newTracing . P.lsmt . P.ssdDirectory "/tmp"
, ciBench02Value & P.name "ci-bench-rtview" . V.valueLocal . P.dreps 0 . P.traceForwardingOn . P.newTracing . P.tracerRtview

, ciBench02Value & P.name "ci-bench-notracer" . V.valueLocal . P.dreps 0 . P.traceForwardingOff . P.newTracing
, ciBench02Value & P.name "ci-bench-drep" . V.valueLocal . P.dreps 10 . P.traceForwardingOn . P.newTracing
, ciBench02Plutus & P.name "ci-bench-plutus" . loop . P.dreps 0 . P.traceForwardingOn . P.newTracing
Expand Down Expand Up @@ -115,7 +118,8 @@ profilesNoEraMiniature =
dense & P.name "6-dense" . V.valueCloud . duration30 . P.traceForwardingOn . P.newTracing
, dense & P.name "6-dense-rtsprof" . V.valueCloud . duration30 . P.traceForwardingOn . P.newTracing . P.rtsHeapProf . P.rtsEventlogged
, dense & P.name "6-dense-1h" . V.valueCloud . duration60 . P.traceForwardingOn . P.newTracing
, dense & P.name "6-dense-1h-rtsprof" . V.valueCloud . duration60 . P.traceForwardingOn . P.newTracing . P.rtsHeapProf . P.rtsEventlogged
, dense & P.name "6-dense-1h-rtsprof" . V.valueCloud . duration60 . P.traceForwardingOn . P.newTracing . P.rtsHeapProf . P.rtsEventlogged
, dense & P.name "6-dense-timeseries-1h" . V.valueCloud . duration60 . P.traceForwardingOn . P.newTracing . P.tracerRtview . P.tracerTimeseries
, dense & P.name "6-dense-4h" . V.valueCloud . duration240 . P.traceForwardingOn . P.newTracing
, dense & P.name "6-dense-4h-rtsprof" . V.valueCloud . duration240 . P.traceForwardingOn . P.newTracing . P.rtsHeapProf . P.rtsEventlogged
]
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ module Cardano.Benchmarking.Profile.Primitives (
, workloadAppend

-- Tracer's params.
, tracerRtview, tracerWithresources
, tracerRtview, tracerWithresources, tracerTimeseries

-- Cluster params.
, clusterMinimunStorage, ssdDirectory, clusterKeepRunningOn
Expand Down Expand Up @@ -203,6 +203,7 @@ empty = Types.Profile {
Types.rtview = False
, Types.ekg = False
, Types.withresources = False
, Types.timeseries = False
}
, Types.cluster = Nothing
, Types.analysis = Types.Analysis {
Expand Down Expand Up @@ -804,6 +805,9 @@ tracerRtview = tracer (\t -> t {Types.rtview = True})
tracerWithresources :: Types.Profile -> Types.Profile
tracerWithresources = tracer (\t -> t {Types.withresources = True})

tracerTimeseries :: Types.Profile -> Types.Profile
tracerTimeseries = tracer (\t -> t {Types.timeseries = True})

-- Cluster.
--------------------------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,7 @@ data Tracer = Tracer
{ rtview :: Bool
, ekg :: Bool
, withresources :: Bool
, timeseries :: Bool
}
deriving (Eq, Show, Generic)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ fundsDouble = P.poolBalance 1000000000000000 . P.funds 20000000000000 . P.utxoK
fundsVoting :: Types.Profile -> Types.Profile
fundsVoting = P.poolBalance 1000000000000000 . P.funds 40000000000000 . P.utxoKeys 2


-- Definition vocabulary: composition.
--------------------------------------

Expand Down
1 change: 1 addition & 0 deletions bench/cardano-profile/test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ ciTestBage = Types.Profile {
Types.rtview = False
, Types.ekg = False
, Types.withresources = False
, Types.timeseries = False
}
, Types.cluster = Nothing
, Types.analysis = Types.Analysis {
Expand Down
42 changes: 42 additions & 0 deletions bench/cardano-timeseries-io/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@
# Revision history for cardano-timeseries-io

## 1.1.0 -- May 2026

### Breaking changes

* JSON wire format aligned with Prometheus conventions:
- Response envelope uses `{"status":"success","data":...}` /
`{"status":"error","errorType":"...","error":"..."}`.
- `resultType` / `result` field names replace the previous `tag` / `value`.
- Prometheus result-type strings (`scalar`, `vector`, `matrix`) used
throughout.
- Timestamps and durations encoded as Unix seconds (Double).
- Data-point values encoded as strings (Prometheus convention).
- `metric` / `values` field names replace `labels` / `data` in
instant-vector and time-series objects.

### New features

* `Unit` type: unit literal `()`, pair `(a, b)`, and triple `(a, b, c)`
expressions.
* `List` type: `Nil` / `Cons` values; `metrics` builtin enumerates all
metric names known to the store.
* `RangeVector` / `Scalar` arithmetic: range vectors can now appear as
operands in arithmetic expressions with scalars.
* `Duration + Duration` noncanonical arithmetic rule.
* Three additional unambiguous noncanonical arithmetic rules.
* Local name shadowing: inner `let` bindings correctly shadow outer ones.
* Metric-name awareness in the elaborator: unknown identifiers that are not
in the metric store now produce an `Undefined name` error with a
"did you mean?" suggestion instead of a type-mismatch later.

### Bug fixes

* `epoch` keyword was incorrectly parsed; now correctly produces
`Timestamp 0`.
* `sum_over_time` elaboration bug fixed.
* Parser bug fixed (duration suffix bleed into adjacent identifiers).

### Testing

* Comprehensive test suite added: parser, elaborator, and interpreter suites
covering 362 cases.

## 1.0.0 -- March 2026

* First version.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ repl store interpCfg now = forever $ do
case parse (expr <* space <* eof) "input" queryString of
Left err -> putStrLn (errorBundlePretty err)
Right surfaceQuery -> do
case evalState (runExceptT (elab surfaceQuery)) initialSt of
case evalState (runExceptT (elab surfaceQuery)) (initialSt (metrics store)) of
Left err -> Text.putStrLn err
Right query -> do
Text.putStrLn (showT query)
Expand Down
2 changes: 1 addition & 1 deletion bench/cardano-timeseries-io/bench/Bench.hs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ main = do
case parse (Surface.Parser.expr <* space <* eof) "input" query of
Left err -> putStrLn (errorBundlePretty err)
Right surfaceQuery -> do
case evalState (runExceptT (elab surfaceQuery)) initialSt of
case evalState (runExceptT (elab surfaceQuery)) (initialSt (metrics flatStore)) of
Left err -> Text.putStrLn err
Right !q -> do
Text.putStrLn (showT q)
Expand Down
23 changes: 22 additions & 1 deletion bench/cardano-timeseries-io/cardano-timeseries-io.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 3.4
name: cardano-timeseries-io
description: Cardano Timeseries Input/Output for realtime metric storage & query.
version: 1.0.0
version: 1.1.0
category: Cardano
Metrics
copyright: 2026 Intersect.
Expand Down Expand Up @@ -53,6 +53,7 @@ library
, base
, containers
, deepseq
, edit-distance
, megaparsec
, mtl
, scientific
Expand Down Expand Up @@ -86,6 +87,7 @@ library
, Cardano.Timeseries.Interp.Expr
, Cardano.Timeseries.Interp.Types
, Cardano.Timeseries.Interp.Value
, Cardano.Timeseries.JSON

, Cardano.Timeseries.Store
, Cardano.Timeseries.Store.Flat
Expand Down Expand Up @@ -145,6 +147,25 @@ executable cardano-timeseries-io
, trace-resources
, vector

test-suite cardano-timeseries-test
import: common
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Cardano/Timeseries/Unit.hs
other-modules:
Cardano.Timeseries.Elab.Expr.Parser.Suite
, Cardano.Timeseries.Elab.Suite
, Cardano.Timeseries.Interp.Suite
build-depends:
base
, cardano-timeseries-io
, containers
, megaparsec
, mtl
, tasty
, tasty-hunit
, text

benchmark cardano-timeseries-io-bench
import: common
type: exitcode-stdio-1.0
Expand Down
6 changes: 5 additions & 1 deletion bench/cardano-timeseries-io/docs/elab.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ let x = t in t
t t
fst t
snd t
()
(t, t)
t == t (~)
t != t (~)
Expand All @@ -25,7 +26,7 @@ t && t
t || t
<int>ms
<int>s
<int>min
<int>m
<int>h
epoch
now
Expand All @@ -40,13 +41,16 @@ filter t t
join t t
map t t
abs t
round t
increase t
rate t
avg_over_time t
sum_over_time t
quantile_over_time t t
unless t t
quantile_by (s, ..., s) t t
earliest x
latest x
x
metrics

Expand Down
Loading
Loading