tusharmath / observable-air

Observable for the calorie conscious
MIT License
34 stars 3 forks source link

feat(operators): add delay() operator #120

Closed tusharmath closed 7 years ago

tusharmath commented 7 years ago

delay can be use for debouncing also

tusharmath commented 7 years ago

observable-air@ benchmark /home/travis/build/tusharmath/observable-air tsc && node ./.dist/benchmarks/run

Node: v7.4.0 V8: 5.4.500.45

┌────────────────────────┬─────────────────────┬─────────┐
│ name                   │ ops/sec             │ samples │
├────────────────────────┼─────────────────────┼─────────┤
│ create                 │ 1,019 (±0.42%)      │ 85      │
├────────────────────────┼─────────────────────┼─────────┤
│ file -> map -> reduce  │ 220 (±1.4%)         │ 81      │
├────────────────────────┼─────────────────────┼─────────┤
│ file -> scan -> reduce │ 59 (±0.66%)         │ 69      │
├────────────────────────┼─────────────────────┼─────────┤
│ file -> takeN(0, n/10) │ 553 (±1.71%)        │ 80      │
├────────────────────────┼─────────────────────┼─────────┤
│ tryCatch               │ 14,219,011 (±1.82%) │ 88      │
└────────────────────────┴─────────────────────┴─────────┘
coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.1%) to 88.253% when pulling f99817eb9a32ee90b0a16b9e0820b0bbfdec814c on delay-operator into b1395c34e6cc4df9a2f310c6209a95655f6712f0 on master.

tusharmath commented 7 years ago

observable-air@ benchmark /home/travis/build/tusharmath/observable-air tsc && node ./.dist/benchmarks/run

Node: v7.4.0 V8: 5.4.500.45

┌────────────────────────┬────────────────────┬─────────┐
│ name                   │ ops/sec            │ samples │
├────────────────────────┼────────────────────┼─────────┤
│ create                 │ 1,009 (±0.83%)     │ 84      │
├────────────────────────┼────────────────────┼─────────┤
│ file -> map -> reduce  │ 214 (±2.06%)       │ 80      │
├────────────────────────┼────────────────────┼─────────┤
│ file -> scan -> reduce │ 57 (±1.66%)        │ 67      │
├────────────────────────┼────────────────────┼─────────┤
│ file -> takeN(0, n/10) │ 549 (±1.89%)       │ 79      │
├────────────────────────┼────────────────────┼─────────┤
│ tryCatch               │ 14,224,740 (±2.4%) │ 81      │
└────────────────────────┴────────────────────┴─────────┘
coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.1%) to 88.253% when pulling f99817eb9a32ee90b0a16b9e0820b0bbfdec814c on delay-operator into b1395c34e6cc4df9a2f310c6209a95655f6712f0 on master.