namespace dhcp {
namespace bench {
-GenericHostDataSourceBenchmark::GenericHostDataSourceBenchmark() : hdsptr_() {
+GenericHostDataSourceBenchmark::GenericHostDataSourceBenchmark()
+ : hdsptr_() {
LibDHCP::clearRuntimeOptionDefs();
}
void
GenericHostDataSourceBenchmark::ReentrantSetUp(::benchmark::State& state,
- size_t const& host_count) {
+ size_t const& host_count) {
state.PauseTiming();
SetUp(state);
prepareHosts(host_count);
}
void
-GenericHostDataSourceBenchmark::ReentrantSetUpWithInserts(
- ::benchmark::State& state, size_t const& host_count) {
+GenericHostDataSourceBenchmark::ReentrantSetUpWithInserts(::benchmark::State& state,
+ size_t const& host_count) {
state.PauseTiming();
SetUp(state);
prepareHosts(host_count);
}
HostPtr
-GenericHostDataSourceBenchmark::initializeHost4(
- const std::string& address, const Host::IdentifierType& id) {
+GenericHostDataSourceBenchmark::initializeHost4(const std::string& address,
+ const Host::IdentifierType& id) {
std::vector<uint8_t> ident;
if (id == Host::IDENT_HWADDR) {
ident = generateHWAddr();
HostPtr
GenericHostDataSourceBenchmark::initializeHost6(std::string address,
Host::IdentifierType identifier,
- bool prefix,
- bool new_identifier) {
+ bool prefix, bool new_identifier) {
std::vector<uint8_t> ident;
switch (identifier) {
case Host::IDENT_HWADDR:
}
OptionDescriptor
-GenericHostDataSourceBenchmark::createEmptyOption(
- const Option::Universe& universe,
- const uint16_t option_type,
- const bool persist) const {
+GenericHostDataSourceBenchmark::createEmptyOption(const Option::Universe& universe,
+ const uint16_t option_type,
+ const bool persist) const {
OptionPtr option(new Option(universe, option_type));
OptionDescriptor desc(option, persist);
return desc;
}
OptionDescriptor
-GenericHostDataSourceBenchmark::createVendorOption(
- const Option::Universe& universe,
- const bool persist,
- const bool formatted,
- const uint32_t vendor_id) const {
+GenericHostDataSourceBenchmark::createVendorOption(const Option::Universe& universe,
+ const bool persist,
+ const bool formatted,
+ const uint32_t vendor_id) const {
OptionVendorPtr option(new OptionVendor(universe, vendor_id));
std::ostringstream s;
}
void
-GenericHostDataSourceBenchmark::addTestOptions(
- const HostPtr& host,
- const bool formatted,
- const AddedOptions& added_options) const {
+GenericHostDataSourceBenchmark::addTestOptions(const HostPtr& host, const bool formatted,
+ const AddedOptions& added_options) const {
OptionDefSpaceContainer defs;
if ((added_options == DHCP4_ONLY) || (added_options == DHCP4_AND_DHCP6)) {
/// @return Configuration string for @c LeaseMgrFactory.
static std::string getConfigString(Universe u) {
std::ostringstream s;
- s << "type=memfile " << (u == V4 ? "universe=4 " : "universe=6 ")
- << "name="
+ s << "type=memfile " << (u == V4 ? "universe=4 " : "universe=6 ") << "name="
<< getLeaseFilePath(u == V4 ? "leasefile4_0.csv" : "leasefile6_0.csv")
<< " lfc-interval=0";
return (s.str());
// resulting file names are the ones that may exist as a
// result of LFC.
for (int i = static_cast<int>(Memfile_LeaseMgr::FILE_CURRENT);
- i <= static_cast<int>(Memfile_LeaseMgr::FILE_FINISH);
- ++i) {
- Memfile_LeaseMgr::LFCFileType type = static_cast<
- Memfile_LeaseMgr::LFCFileType>(i);
+ i <= static_cast<int>(Memfile_LeaseMgr::FILE_FINISH); ++i) {
+ Memfile_LeaseMgr::LFCFileType type = static_cast<Memfile_LeaseMgr::LFCFileType>(i);
LeaseFileIO io(Memfile_LeaseMgr::appendSuffix(base_name, type));
io.removeFile();
}