<commit_before>/**
 * @file AggregatorConfig.h
 * @author <NAME>
 * @date Jun 23, 2011
 * @brief 
 */
#ifndef AGGREGATOR_CONFIG_H_
#define AGGREGATOR_CONFIG_H_

#include <stdint.h>
#include <string>
#include <vector>

#include "JobInfo.h"

namespace net{
namespace aggregator{

class AggregatorConfig
{
public:
    AggregatorConfig()
    :enableLocalWorker_(true)
    {}

    void addWorker(const std::string& host, uint16_t port)
    {
        ServerInfo workerInfo(host, port);
        workerInfoList_.push_back(workerInfo);
    }

    const std::vector<ServerInfo>& getWorkerList() const
    {
        return workerInfoList_;
    }

public:<commit_msg>add help function for AggregatorConfig<commit_after>/**
 * @file AggregatorConfig.h
 * @author <NAME>
 * @date Jun 23, 2011
 * @brief 
 */
#ifndef AGGREGATOR_CONFIG_H_
#define AGGREGATOR_CONFIG_H_

#include <stdint.h>
#include <string>
#include <vector>
#include <sstream>

#include "JobInfo.h"

namespace net{
namespace aggregator{

class AggregatorConfig
{
public:
    AggregatorConfig()
    :enableLocalWorker_(true)
    {}

    void addWorker(const std::string& host, uint16_t port)
    {
        ServerInfo workerInfo(host, port);
        workerInfoList_.push_back(workerInfo);
    }

    const std::vector<ServerInfo>& getWorkerList() const
    {
        return workerInfoList_;
    }

    std::string toString()
    {
        std::stringstream ss;
        ss <<"[AggregatorConfig] localWorker enabled ? "<<enableLocalWorker_<<endl;

        for (size_t i = 0; i < workerInfoList_.size(); i++)
        {
            ss << "worker="<<workerInfoList_[i].host_<<":"<<workerInfoList_[i].port_<<endl;
        }

        return ss.str();
    }

public:
{'fraction_non_alphanumeric': 0.12419449326303457, 'fraction_numerical': 0.00995899238429994, 'mean_word_length': 3.402061855670103, 'pattern_counts': {'":': 1, '<': 31, '<?xml version=': 0, '>': 14, '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': '7545750', 'n_tokens_mistral': 583, 'n_tokens_neox': 559, 'n_words': 121}