forked from handshake-org/hsd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dns: use char code conversion instead of Buffer for nsec epsilons
- Loading branch information
Showing
2 changed files
with
25 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
'use strict'; | ||
|
||
const bench = require('./bench'); | ||
const nsec = require('../lib/dns/nsec'); | ||
const {TYPE_MAP_EMPTY} = require('../lib/dns/common'); | ||
|
||
const tld = 'dollarydoo'; | ||
const ops = 100000; | ||
|
||
const end = bench('nsec'); | ||
for (let i = 0; i < ops; i++) { | ||
const prev = nsec.prevName(tld); | ||
const next = nsec.nextName(tld); | ||
nsec.create(prev, next, TYPE_MAP_EMPTY); | ||
} | ||
end(ops); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters