Skip to content

Commit

Permalink
Add merge in place and patch in place benches
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Wahl <mwahl@wayfair.com>
  • Loading branch information
Matthias Wahl committed Sep 15, 2021
1 parent 2f81288 commit 70f7e11
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 0 deletions.
25 changes: 25 additions & 0 deletions bench/merge_assign_target.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Test a realistic workflow including json encoding and decoding
# and connect both the pass and the overflow output to the
# blackhole to acount for the data
---
onramp:
- id: blaster
type: blaster
codec: json
config:
source: ./demo/data/data.json.xz

offramp:
- id: blackhole
type: blackhole
codec: json
config:
warmup_secs: 10
stop_after_secs: 100
significant_figures: 2

binding:
- id: bench
links:
"/onramp/blaster/{instance}/out": ["/pipeline/main/{instance}/in"]
"/pipeline/main/{instance}/out": ["/offramp/blackhole/{instance}/in"]
11 changes: 11 additions & 0 deletions bench/merge_assign_target/main.trickle
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
define script merge_assign_target
script
let event = merge event of {"foo": "bar"} end;
emit event;
end;

create script merge_assign_target;

select event from in into merge_assign_target;
select event from merge_assign_target into out;
select event from merge_assign_target/err into err;
25 changes: 25 additions & 0 deletions bench/patch_assign_target.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Test a realistic workflow including json encoding and decoding
# and connect both the pass and the overflow output to the
# blackhole to acount for the data
---
onramp:
- id: blaster
type: blaster
codec: json
config:
source: ./demo/data/data.json.xz

offramp:
- id: blackhole
type: blackhole
codec: json
config:
warmup_secs: 10
stop_after_secs: 100
significant_figures: 2

binding:
- id: bench
links:
"/onramp/blaster/{instance}/out": ["/pipeline/main/{instance}/in"]
"/pipeline/main/{instance}/out": ["/offramp/blackhole/{instance}/in"]
11 changes: 11 additions & 0 deletions bench/patch_assign_target/main.trickle
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
define script patch_assign_target
script
let event = patch event of insert "foo" => "bar" end;
emit event;
end;

create script patch_assign_target;

select event from in into patch_assign_target;
select event from patch_assign_target into out;
select event from patch_assign_target/err into err;

0 comments on commit 70f7e11

Please sign in to comment.