<title>perfdhcp objects breakdown</title><linkrel="stylesheet"href="../../../doc/guide/bind10-guide.css"type="text/css"><metaname="generator"content="DocBook XSL Stylesheets V1.75.2"><metaname="description"content="This document briefly describes C++ classes being part of the perfdhcp tool."></head><bodybgcolor="white"text="black"link="#0000FF"vlink="#840084"alink="#0000FF"><divclass="book"title="perfdhcp objects breakdown"><divclass="titlepage"><div><div><h1class="title"><aname="d0e3"></a>perfdhcp objects breakdown</h1></div><div><divclass="author"><h3class="author"><spanclass="firstname">Marcin</span><spanclass="surname">Siodelski</span></h3></div></div><div><pclass="releaseinfo">This is a companion document for BIND 10 version
TestControl singleton is responsible for test execution coordination.
It relies on CommandOptions object to get all required test parameters. For
this reason CommandOptions has to be initialized and CommandOptions::parse()
has to be called prior to calling TestControl::run(). The latter function
performs initialization of TestControl internals and execues the main program
loop. The TestControl::run() function performs the following major operations:
</p><divclass="orderedlist"><olclass="orderedlist"type="1"><liclass="listitem"><p>check if command line has been parsed,</p></li><liclass="listitem"><p>prints diagnostics if specified from command line,</p></li><liclass="listitem"><p>register DHCP options factory functions,</p></li><liclass="listitem"><p>read packet templates from files,</p></li><liclass="listitem"><p>initialize Statistics Manager object,</p></li><liclass="listitem"><p>set interrupt signal handler (handle ^C),</p></li><liclass="listitem"><p>open and close socket for communication with server,</p></li><liclass="listitem"><p>coordinate sending and receiving packets,</p></li><liclass="listitem"><p>coordinate intermediate reporting,</p></li><liclass="listitem"><p>prints test statistics.</p></li></ol></div><p>
</p><p>
TestControl is a singleton object so there is one sole instance of
it throughout the program. In order to allow running performance test
multiple times (using different command line options) with single instance
of the TestControl object it uses TestControl::reset() function internally
to reset state of the class members. Also, functions that initialize
various class members like Statistics Manager will release any objects