centralized and cmake-based campaign server+port config
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1590 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
@ -19,11 +19,13 @@ OPTION(CONFIG_SUPPRESS_INTERRUPTS "Target backend: Suppress interrupts" OF
|
|||||||
OPTION(CONFIG_FIRE_INTERRUPTS "Target backend: Fire interrupts" OFF)
|
OPTION(CONFIG_FIRE_INTERRUPTS "Target backend: Fire interrupts" OFF)
|
||||||
OPTION(CONFIG_DISABLE_KEYB_INTERRUPTS "Target backend: Suppress keyboard interrupts" OFF)
|
OPTION(CONFIG_DISABLE_KEYB_INTERRUPTS "Target backend: Suppress keyboard interrupts" OFF)
|
||||||
OPTION(SERVER_PERFORMANCE_MEASURE "Performance measurement in job-server" OFF)
|
OPTION(SERVER_PERFORMANCE_MEASURE "Performance measurement in job-server" OFF)
|
||||||
SET(SERVER_PERF_LOG_PATH "perf.log" CACHE STRING "A file name for storing the server's performance log (CSV)")
|
SET(SERVER_COMM_HOSTNAME "localhost" CACHE STRING "Job-server hostname or IP")
|
||||||
SET(SERVER_PERF_STEPPING_SEC "1" CACHE STRING "Stepping of performance measurements in seconds")
|
SET(SERVER_COMM_TCP_PORT "1111" CACHE STRING "Job-server TCP port")
|
||||||
SET(CLIENT_RAND_BACKOFF_TSTART "3" CACHE STRING "Lower limit of client's backoff phase in seconds")
|
SET(SERVER_PERF_LOG_PATH "perf.log" CACHE STRING "A file name for storing the server's performance log (CSV)")
|
||||||
SET(CLIENT_RAND_BACKOFF_TEND "8" CACHE STRING "Upper limit of client's backoff phase in seconds")
|
SET(SERVER_PERF_STEPPING_SEC "1" CACHE STRING "Stepping of performance measurements in seconds")
|
||||||
SET(CLIENT_RETRY_COUNT "3" CACHE STRING "Client's number of reconnect retries")
|
SET(CLIENT_RAND_BACKOFF_TSTART "3" CACHE STRING "Lower limit of client's backoff phase in seconds")
|
||||||
|
SET(CLIENT_RAND_BACKOFF_TEND "8" CACHE STRING "Upper limit of client's backoff phase in seconds")
|
||||||
|
SET(CLIENT_RETRY_COUNT "3" CACHE STRING "Client's number of reconnect retries")
|
||||||
|
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FailConfig.hpp.in
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FailConfig.hpp.in
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/FailConfig.hpp)
|
${CMAKE_CURRENT_BINARY_DIR}/FailConfig.hpp)
|
||||||
|
|||||||
@ -27,6 +27,8 @@
|
|||||||
#cmakedefine CONFIG_FIRE_INTERRUPTS
|
#cmakedefine CONFIG_FIRE_INTERRUPTS
|
||||||
#cmakedefine CONFIG_DISABLE_KEYB_INTERRUPTS
|
#cmakedefine CONFIG_DISABLE_KEYB_INTERRUPTS
|
||||||
#cmakedefine SERVER_PERFORMANCE_MEASURE
|
#cmakedefine SERVER_PERFORMANCE_MEASURE
|
||||||
|
#cmakedefine SERVER_COMM_HOSTNAME "@SERVER_COMM_HOSTNAME@"
|
||||||
|
#cmakedefine SERVER_COMM_TCP_PORT @SERVER_COMM_TCP_PORT@
|
||||||
#cmakedefine SERVER_PERF_LOG_PATH "@SERVER_PERF_LOG_PATH@"
|
#cmakedefine SERVER_PERF_LOG_PATH "@SERVER_PERF_LOG_PATH@"
|
||||||
#cmakedefine SERVER_PERF_STEPPING_SEC @SERVER_PERF_STEPPING_SEC@
|
#cmakedefine SERVER_PERF_STEPPING_SEC @SERVER_PERF_STEPPING_SEC@
|
||||||
#cmakedefine CLIENT_RAND_BACKOFF_TSTART @CLIENT_RAND_BACKOFF_TSTART@
|
#cmakedefine CLIENT_RAND_BACKOFF_TSTART @CLIENT_RAND_BACKOFF_TSTART@
|
||||||
|
|||||||
@ -130,7 +130,7 @@ void JobServer::run()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* IPv4, Port: 1111, accept all IP adresses */
|
/* IPv4, bind to all interfaces */
|
||||||
struct sockaddr_in saddr;
|
struct sockaddr_in saddr;
|
||||||
saddr.sin_family = AF_INET;
|
saddr.sin_family = AF_INET;
|
||||||
saddr.sin_port = htons(m_port);
|
saddr.sin_port = htons(m_port);
|
||||||
|
|||||||
@ -72,7 +72,7 @@ private:
|
|||||||
void sendWork(int sockfd);
|
void sendWork(int sockfd);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
JobServer(int port = 1111) : m_port(port), m_finish(false), m_noMoreExps(false),
|
JobServer(int port = SERVER_COMM_TCP_PORT) : m_port(port), m_finish(false), m_noMoreExps(false),
|
||||||
m_maxThreads(128), m_threadtimeout(0)
|
m_maxThreads(128), m_threadtimeout(0)
|
||||||
{
|
{
|
||||||
#ifndef __puma
|
#ifndef __puma
|
||||||
|
|||||||
@ -31,7 +31,7 @@ private:
|
|||||||
|
|
||||||
FailControlMessage_Command tryToGetExperimentData(ExperimentData& exp);
|
FailControlMessage_Command tryToGetExperimentData(ExperimentData& exp);
|
||||||
public:
|
public:
|
||||||
JobClient(const std::string& server = "localhost", int port = 1111);
|
JobClient(const std::string& server = SERVER_COMM_HOSTNAME, int port = SERVER_COMM_TCP_PORT);
|
||||||
/**
|
/**
|
||||||
* Receive experiment data set from (remote) JobServer
|
* Receive experiment data set from (remote) JobServer
|
||||||
* The caller (experiment developer) is responsible for
|
* The caller (experiment developer) is responsible for
|
||||||
|
|||||||
@ -7,7 +7,6 @@
|
|||||||
class ChecksumOOStuBSExperiment : public fail::ExperimentFlow {
|
class ChecksumOOStuBSExperiment : public fail::ExperimentFlow {
|
||||||
fail::JobClient m_jc;
|
fail::JobClient m_jc;
|
||||||
public:
|
public:
|
||||||
ChecksumOOStuBSExperiment() : m_jc("ios.cs.tu-dortmund.de") {}
|
|
||||||
bool run();
|
bool run();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,6 @@
|
|||||||
class CoolChecksumExperiment : public fail::ExperimentFlow {
|
class CoolChecksumExperiment : public fail::ExperimentFlow {
|
||||||
fail::JobClient m_jc;
|
fail::JobClient m_jc;
|
||||||
public:
|
public:
|
||||||
CoolChecksumExperiment() : m_jc("ios.cs.tu-dortmund.de") {}
|
|
||||||
bool run();
|
bool run();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@ class EcosKernelTestExperiment : public fail::ExperimentFlow {
|
|||||||
fail::JobClient m_jc;
|
fail::JobClient m_jc;
|
||||||
fail::Logger log;
|
fail::Logger log;
|
||||||
public:
|
public:
|
||||||
EcosKernelTestExperiment() : m_jc("ios.cs.tu-dortmund.de"), log("eCos Kernel Test", false) {}
|
EcosKernelTestExperiment() : log("eCos Kernel Test", false) {}
|
||||||
bool run();
|
bool run();
|
||||||
|
|
||||||
bool retrieveGuestAddresses(); // step 0
|
bool retrieveGuestAddresses(); // step 0
|
||||||
|
|||||||
@ -7,7 +7,6 @@
|
|||||||
class VEZSExperiment : public fail::ExperimentFlow {
|
class VEZSExperiment : public fail::ExperimentFlow {
|
||||||
fail::JobClient m_jc;
|
fail::JobClient m_jc;
|
||||||
public:
|
public:
|
||||||
VEZSExperiment() : m_jc("ios.cs.tu-dortmund.de") {}
|
|
||||||
bool run();
|
bool run();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,6 @@
|
|||||||
class WeatherMonitorExperiment : public fail::ExperimentFlow {
|
class WeatherMonitorExperiment : public fail::ExperimentFlow {
|
||||||
fail::JobClient m_jc;
|
fail::JobClient m_jc;
|
||||||
public:
|
public:
|
||||||
WeatherMonitorExperiment() : m_jc("ios.cs.tu-dortmund.de") {}
|
|
||||||
bool run();
|
bool run();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user