<commit_before>
#include "zlog/zlog.hpp"

#include "exemodel/poll_tools.hpp"
#include "exemodel/poller.hpp"
#include "exemodel/pollee.hpp"

namespace exemodel {

poller::poller()
: pollee(::epoll_create1(EPOLL_CLOEXEC), uint32_t(::EPOLLIN | ::EPOLLOUT | ::EPOLLPRI), "poller")
{
}

poller::~poller()
{
}

void poller::add(pollee & obj) const
{
	struct epoll_event evt;
	evt.events = obj._evts();
	evt.data.ptr = &obj;
	int ret = ::epoll_ctl(this->fd(), EPOLL_CTL_ADD, obj.fd(), &evt);
	validate_ret(ret, "epoll add fd");
}

void poller::del(pollee & obj) const
{
	int ret = ::epoll_ctl(this->fd(), EPOLL_CTL_DEL, obj.fd(), NULL);
	validate_ret(ret, "epoll del fd");
}

void poller::mod(pollee & obj) const
{
	struct epoll_event evt;
	evt.events = obj._evts();
	evt.data.ptr = &obj;
	int ret = ::epoll_ctl(this->fd(), EPOLL_CTL_MOD, obj.fd(), &evt);
	validate_ret(ret, "epoll del fd");
}
<commit_msg>fix wrong info<commit_after>
#include "zlog/zlog.hpp"

#include "exemodel/poll_tools.hpp"
#include "exemodel/poller.hpp"
#include "exemodel/pollee.hpp"

namespace exemodel {

poller::poller()
: pollee(::epoll_create1(EPOLL_CLOEXEC), uint32_t(::EPOLLIN | ::EPOLLOUT | ::EPOLLPRI), "poller")
{
}

poller::~poller()
{
}

void poller::add(pollee & obj) const
{
	struct epoll_event evt;
	evt.events = obj._evts();
	evt.data.ptr = &obj;
	int ret = ::epoll_ctl(this->fd(), EPOLL_CTL_ADD, obj.fd(), &evt);
	validate_ret(ret, "epoll add fd");
}

void poller::del(pollee & obj) const
{
	int ret = ::epoll_ctl(this->fd(), EPOLL_CTL_DEL, obj.fd(), NULL);
	validate_ret(ret, "epoll del fd");
}

void poller::mod(pollee & obj) const
{
	struct epoll_event evt;
	evt.events = obj._evts();
	evt.data.ptr = &obj;
	int ret = ::epoll_ctl(this->fd(), EPOLL_CTL_MOD, obj.fd(), &evt);
	validate_ret(ret, "epoll mod fd");
}

{'fraction_non_alphanumeric': 0.19010561423012784, 'fraction_numerical': 0.0033351862145636463, 'mean_word_length': 5.405693950177936, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '3359712', 'n_tokens_mistral': 783, 'n_tokens_neox': 794, 'n_words': 150}