Browse Source

[Minor] Disable headers hash for statistics

Discussed with: @moisseev
tags/3.0
Vsevolod Stakhov 3 years ago
parent
commit
d07edfa195
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      lualib/lua_stat.lua

+ 5
- 0
lualib/lua_stat.lua View File

end end


local function get_headers_stat_tokens(task, cf, res, i) local function get_headers_stat_tokens(task, cf, res, i)
--[[
-- As discussed with Alexander Moisseev, this feature can skew statistics
-- especially when learning is separated from scanning, so learning
-- has a different set of tokens where this token can have too high weight
local hdrs_cksum = task:get_mempool():get_variable("headers_hash") local hdrs_cksum = task:get_mempool():get_variable("headers_hash")


if hdrs_cksum then if hdrs_cksum then
res[i]) res[i])
i = i + 1 i = i + 1
end end
]]--


for k,hdrs in pairs(cf.classify_headers_parsed) do for k,hdrs in pairs(cf.classify_headers_parsed) do
for _,hname in ipairs(hdrs) do for _,hname in ipairs(hdrs) do

Loading…
Cancel
Save