16af3ae9fc
This commit updates all example files to use `assert_eq!` for verifying output, replacing the previous `Output:` comments. This change makes the examples more robust and self-testing. The benchmark results in some examples have also been slightly adjusted, reflecting minor performance variations after the refactoring. Additionally, a runtime panic handling mechanism has been introduced in the VM for function calls, which improves error reporting for unexpected panics.
24 lines
597 B
Plaintext
24 lines
597 B
Plaintext
;; Benchmark: 1.1us
|
|
;; Benchmark-Repeat: 1783
|
|
;; Test Record SoA specialization in Pipelines
|
|
;; Dank der neuen Spezialisierung wird hierfür im Hintergrund
|
|
;; eine SharedRecordSeries mit SoA-Layout (Float-Puffer für mid und range) erstellt.
|
|
|
|
(do
|
|
(def ohlc_stream (create-random-ohlc 42 10))
|
|
|
|
;; Pipe die einen Record erzeugt
|
|
(def indicator
|
|
(pipe [ohlc_stream]
|
|
(fn [ohlc]
|
|
{
|
|
:mid (/ (+ (.high ohlc) (.low ohlc)) 2.0)
|
|
:range (- (.high ohlc) (.low ohlc))
|
|
}
|
|
)
|
|
)
|
|
)
|
|
|
|
(assert-eq :StreamNode (type-of indicator))
|
|
)
|