mirror of
https://github.com/gorules/zen.git
synced 2026-10-06 16:02:19 +00:00
* chore: add benchmarks for tier 1 languages * improve fixtures * fix cargo fmt
1 line
2.0 KiB
JSON
1 line
2.0 KiB
JSON
{"blocks":[{"id":"dm","type":"dataModel","props":{"data":{"name":"customer","properties":[{"id":"p0","name":"amounts","type":"number","array":true,"optional":false},{"id":"p1","name":"label","type":"string","array":false,"optional":false}]}},"children":[]},{"id":"e1","type":"expression","props":{"data":{"key":"customer.positive","value":"filter(customer.amounts, # > 0)"}}},{"id":"e2","type":"expression","props":{"data":{"key":"customer.negatives","value":"filter(customer.amounts, # < 0)"}}},{"id":"e3","type":"expression","props":{"data":{"key":"customer.doubled","value":"map(customer.amounts, # * 2)"}}},{"id":"e4","type":"expression","props":{"data":{"key":"customer.squared","value":"map(customer.amounts, # * #)"}}},{"id":"e5","type":"expression","props":{"data":{"key":"customer.total","value":"sum(customer.positive)"}}},{"id":"e6","type":"expression","props":{"data":{"key":"customer.negTotal","value":"sum(customer.negatives)"}}},{"id":"e7","type":"expression","props":{"data":{"key":"customer.net","value":"customer.total + customer.negTotal"}}},{"id":"e8","type":"expression","props":{"data":{"key":"customer.posCount","value":"len(customer.positive)"}}},{"id":"e9","type":"expression","props":{"data":{"key":"customer.avg","value":"customer.net / len(customer.amounts)"}}},{"id":"e10","type":"expression","props":{"data":{"key":"customer.maxVal","value":"max(customer.amounts)"}}},{"id":"e11","type":"expression","props":{"data":{"key":"customer.minVal","value":"min(customer.amounts)"}}},{"id":"a1","type":"assertion","props":{"data":{"output":"customer.bigSpender","conditions":[{"id":"a1c","expression":"customer.total > 1000","operator":"and","depth":0}]}},"children":[]},{"id":"a2","type":"assertion","props":{"data":{"output":"customer.balanced","conditions":[{"id":"a2c","expression":"customer.net > 0","operator":"and","depth":0}]}},"children":[]},{"id":"a3","type":"assertion","props":{"data":{"output":"customer.volatile","conditions":[{"id":"a3c","expression":"customer.maxVal - customer.minVal > 50","operator":"and","depth":0}]}},"children":[]}]} |