更新bench app,增加比对结果

This commit is contained in:
Wu Jian Ping
2022-07-22 13:44:23 +08:00
parent 142ded8db5
commit e57db724d3

View File

@@ -91,7 +91,14 @@ const main = async () => {
const mipInt = Math.floor((sipInt + eipInt) / 2)
const mip = intToIp(mipInt)
await searcher.search(mip)
const info = await searcher.search(mip)
const region = list.slice(2, list.length).join('|')
// check the region info
if (region !== info.region) {
console.log(`failed search(${mip}) with (${region} != ${info.region})`)
process.exit(1)
}
total++
})
.on('error', err => {