| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a23562f commit 8440b61
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,17 +3,16 @@ const common = require('../common.js'); | |||
| 3 | 3 | const dc = require('diagnostics_channel'); | |
| 4 | 4 | ||
| 5 | 5 | const bench = common.createBenchmark(main, { | |
| 6 | - n: [1e8], | ||
| 6 | + n: [1e5], | ||
| 7 | 7 | }); | |
| 8 | 8 | ||
| 9 | - function noop() {} | ||
| 9 | + function noop() { } | ||
| 10 | 10 | ||
| 11 | 11 | function main({ n }) { | |
| 12 | - const channel = dc.channel('channel.0'); | ||
| 13 | 12 | ||
| 14 | 13 | bench.start(); | |
| 15 | 14 | for (let i = 0; i < n; i++) { | |
| 16 | - channel.subscribe(noop); | ||
| 15 | + dc.subscribe('channel.0', noop); | ||
| 17 | 16 | } | |
| 18 | 17 | bench.end(n); | |
| 19 | 18 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments