<commit_before>module(..., package.seeall)

local S = require("syscall")
local counter = require("core.counter")
local ffi = require("ffi")
local lib = require("core.lib")
local ipv4 = require("lib.protocol.ipv4")
local ethernet = require("lib.protocol.ethernet")
local lwaftr = require("apps.lwaftr.lwaftr")
local lwtypes = require("apps.lwaftr.lwtypes")
local lwutil = require("apps.lwaftr.lwutil")
local lwcounter = require("apps.lwaftr.lwcounter")
local shm = require("core.shm")
local top = require("program.top.top")

local select_snabb_instance = top.select_snabb_instance
local keys = lwutil.keys

local macaddress_t = ffi.typeof[[
struct { uint8_t ether[6]; }
]]

-- Get the counter dir from the code.
local lwaftr_counters_rel_dir = lwcounter.counters_dir

function show_usage (code)
   print(require("program.lwaftr.query.README_inc"))
   main.exit(code)
end

local function sort (t)
   table.sort(t)
   return t
end

local function is_counter_name (name)
   return lwaftr.counter_names[name] ~= nil
end

<commit_msg>remove reference to unused lwcounter<commit_after>module(..., package.seeall)

local S = require("syscall")
local counter = require("core.counter")
local ffi = require("ffi")
local lib = require("core.lib")
local ipv4 = require("lib.protocol.ipv4")
local ethernet = require("lib.protocol.ethernet")
local lwaftr = require("apps.lwaftr.lwaftr")
local lwtypes = require("apps.lwaftr.lwtypes")
local lwutil = require("apps.lwaftr.lwutil")
local shm = require("core.shm")
local top = require("program.top.top")

local select_snabb_instance = top.select_snabb_instance
local keys = lwutil.keys

local macaddress_t = ffi.typeof[[
struct { uint8_t ether[6]; }
]]

function show_usage (code)
   print(require("program.lwaftr.query.README_inc"))
   main.exit(code)
end

local function sort (t)
   table.sort(t)
   return t
end

local function is_counter_name (name)
   return lwaftr.counter_names[name] ~= nil
end


{'fraction_non_alphanumeric': 0.1313340227507756, 'fraction_numerical': 0.004136504653567736, 'mean_word_length': 5.4072847682119205, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2121303', 'n_tokens_mistral': 695, 'n_tokens_neox': 689, 'n_words': 155}