feat(UseCase): Fluent style UseCase #194

Merged
merged 8 commits into from May 31, 2017

Conversation

Projects
None yet
1 participant
@azu
Member

azu commented May 9, 2017

Fluent style UseCase #193

  • Make exist execute() catchable(try-catch) that use executor method.
  • executor method always catch sync error and async error(promise).

@azu azu referenced this pull request May 9, 2017

Closed

UseCase: Fluent style UseCase #193

@azu azu changed the title from [WIP] feat(UseCase): Fluent style UseCase to feat(UseCase): Fluent style UseCase May 31, 2017

@azu

This comment has been minimized.

Show comment
Hide comment
@azu

azu May 31, 2017

Member

Samle * 5

~/.ghq/github.com/almin/almin/perf/benchmark fluent-style-usecase*
✈ npm run bench

> perf-benchmark@1.0.2 bench /Users/azu/.ghq/github.com/almin/almin/perf/benchmark
> cross-env NODE_ENV=production node index.js

current x 5.78 ops/sec ±21.13% (29 runs sampled)
0.12 x 1.64 ops/sec ±22.73% (11 runs sampled)
0.9 x 3.74 ops/sec ±28.03% (21 runs sampled)
Fastest is current,0.9

~/.ghq/github.com/almin/almin/perf/benchmark fluent-style-usecase* 20s
✈ npm run bench

> perf-benchmark@1.0.2 bench /Users/azu/.ghq/github.com/almin/almin/perf/benchmark
> cross-env NODE_ENV=production node index.js

current x 4.92 ops/sec ±34.36% (25 runs sampled)
0.9 x 4.57 ops/sec ±26.59% (25 runs sampled)
0.12 x 4.01 ops/sec ±26.07% (23 runs sampled)
Fastest is current,0.9,0.12

~/.ghq/github.com/almin/almin/perf/benchmark fluent-style-usecase* 19s
✈ npm run bench

> perf-benchmark@1.0.2 bench /Users/azu/.ghq/github.com/almin/almin/perf/benchmark
> cross-env NODE_ENV=production node index.js

0.12 x 4.31 ops/sec ±28.82% (22 runs sampled)
0.9 x 4.13 ops/sec ±25.07% (23 runs sampled)
current x 4.04 ops/sec ±28.78% (21 runs sampled)
Fastest is 0.12,0.9,current

~/.ghq/github.com/almin/almin/perf/benchmark fluent-style-usecase* 18s
✈ npm run bench

> perf-benchmark@1.0.2 bench /Users/azu/.ghq/github.com/almin/almin/perf/benchmark
> cross-env NODE_ENV=production node index.js

0.9 x 5.30 ops/sec ±25.68% (27 runs sampled)
current x 4.35 ops/sec ±30.10% (24 runs sampled)
0.12 x 1.09 ops/sec ±15.48% (10 runs sampled)
Fastest is 0.9,current

~/.ghq/github.com/almin/almin/perf/benchmark fluent-style-usecase* 23s
✈ npm run bench

> perf-benchmark@1.0.2 bench /Users/azu/.ghq/github.com/almin/almin/perf/benchmark
> cross-env NODE_ENV=production node index.js

0.9 x 4.49 ops/sec ±29.74% (23 runs sampled)
current x 4.30 ops/sec ±29.25% (22 runs sampled)
0.12 x 3.71 ops/sec ±31.77% (25 runs sampled)
Fastest is 0.9,current,0.12
Member

azu commented May 31, 2017

Samle * 5

~/.ghq/github.com/almin/almin/perf/benchmark fluent-style-usecase*
✈ npm run bench

> perf-benchmark@1.0.2 bench /Users/azu/.ghq/github.com/almin/almin/perf/benchmark
> cross-env NODE_ENV=production node index.js

current x 5.78 ops/sec ±21.13% (29 runs sampled)
0.12 x 1.64 ops/sec ±22.73% (11 runs sampled)
0.9 x 3.74 ops/sec ±28.03% (21 runs sampled)
Fastest is current,0.9

~/.ghq/github.com/almin/almin/perf/benchmark fluent-style-usecase* 20s
✈ npm run bench

> perf-benchmark@1.0.2 bench /Users/azu/.ghq/github.com/almin/almin/perf/benchmark
> cross-env NODE_ENV=production node index.js

current x 4.92 ops/sec ±34.36% (25 runs sampled)
0.9 x 4.57 ops/sec ±26.59% (25 runs sampled)
0.12 x 4.01 ops/sec ±26.07% (23 runs sampled)
Fastest is current,0.9,0.12

~/.ghq/github.com/almin/almin/perf/benchmark fluent-style-usecase* 19s
✈ npm run bench

> perf-benchmark@1.0.2 bench /Users/azu/.ghq/github.com/almin/almin/perf/benchmark
> cross-env NODE_ENV=production node index.js

0.12 x 4.31 ops/sec ±28.82% (22 runs sampled)
0.9 x 4.13 ops/sec ±25.07% (23 runs sampled)
current x 4.04 ops/sec ±28.78% (21 runs sampled)
Fastest is 0.12,0.9,current

~/.ghq/github.com/almin/almin/perf/benchmark fluent-style-usecase* 18s
✈ npm run bench

> perf-benchmark@1.0.2 bench /Users/azu/.ghq/github.com/almin/almin/perf/benchmark
> cross-env NODE_ENV=production node index.js

0.9 x 5.30 ops/sec ±25.68% (27 runs sampled)
current x 4.35 ops/sec ±30.10% (24 runs sampled)
0.12 x 1.09 ops/sec ±15.48% (10 runs sampled)
Fastest is 0.9,current

~/.ghq/github.com/almin/almin/perf/benchmark fluent-style-usecase* 23s
✈ npm run bench

> perf-benchmark@1.0.2 bench /Users/azu/.ghq/github.com/almin/almin/perf/benchmark
> cross-env NODE_ENV=production node index.js

0.9 x 4.49 ops/sec ±29.74% (23 runs sampled)
current x 4.30 ops/sec ±29.25% (22 runs sampled)
0.12 x 3.71 ops/sec ±31.77% (25 runs sampled)
Fastest is 0.9,current,0.12
@azu

This comment has been minimized.

Show comment
Hide comment
@azu

azu May 31, 2017

Member

It can be merged I think.
We will consider that Should executor() be exposed?
But, the change about execute() improve error handling of UseCase.
It should be merged.

Member

azu commented May 31, 2017

It can be merged I think.
We will consider that Should executor() be exposed?
But, the change about execute() improve error handling of UseCase.
It should be merged.

@azu azu merged commit 29933bb into master May 31, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@azu azu deleted the fluent-style-usecase branch May 31, 2017

@azu azu referenced this pull request Jul 8, 2017

Closed

almin: 0.13 #225

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment