Dakota
Version 6.20
Explore and Predict with Confidence
|
TrackerHTTP: a usage tracking module that uses HTTP/HTTPS via the curl library. More...
Classes | |
struct | Server |
struct to hold tracker/proxy pairs More... | |
Public Member Functions | |
TrackerHTTP () | |
default constructor is allowed, but doesn't generate output | |
TrackerHTTP (int world_rank=0) | |
standard constructor with ProblemDescDB, rank | |
~TrackerHTTP () | |
destructor to free handles | |
void | post_start (ProblemDescDB &problem_db) |
post the start of an analysis and archive start time | |
void | post_finish (unsigned runtime=0) |
post the completion of an analysis including elapsed time | |
Private Member Functions | |
void | initialize (int world_rank=0) |
shared initialization functions across constructors | |
void | url_add_field (std::string &url, const char *keyword, const std::string &value, bool delimit=true) const |
append keyword/value pair to url in GET style (with &keyword=value); set delimit = false to omit the & | |
void | build_default_data (std::string &url, std::time_t &rawtime, const std::string &mode) const |
construct URL with shared information for start/finish | |
void | send_data_using_get (const std::string &urltopost) const |
transmit data to the web server using GET More... | |
void | send_data_using_post (const std::string &datatopost) |
POST separate location and query; datatopost="name=daniel&project=curl". More... | |
void | split_string (const std::string &s, const char &delim, std::vector< std::string > &elems) |
Split a string on a delimiter and place tokens in elems. | |
void | parse_tracking_string (const std::string &dt) |
Populate serverList with tracker and proxy URLs from dt. | |
void | populate_method_list (ProblemDescDB &problem_db) |
extract list of methods from problem database | |
std::string | get_uid () const |
get the real user ID | |
std::string | get_username () const |
get the username as reported by the environment | |
std::string | get_hostname () const |
get the system hostname | |
std::string | get_os () const |
get the operating system | |
std::string | get_datetime (const std::time_t &rawtime) const |
get the date and time as a string YYYYMMDDHHMMSS | |
Private Attributes | |
CURL * | curlPtr |
pointer to the curl handler instance | |
FILE * | devNull |
pointer to /dev/null | |
std::list< Server > | serverList |
List of servers to try (tracker and proxy) | |
long | timeoutSeconds |
seconds until the request will timeout (may have issues with signals) | |
std::string | methodList |
list of active methods | |
std::string | dakotaVersion |
DAKOTA version. | |
std::time_t | startTime |
cached starting time in raw seconds | |
short | outputLevel |
verbosity control | |
TrackerHTTP: a usage tracking module that uses HTTP/HTTPS via the curl library.
|
private |
transmit data to the web server using GET
whole url including location&fields
References TrackerHTTP::curlPtr, and TrackerHTTP::outputLevel.
|
private |
POST separate location and query; datatopost="name=daniel&project=curl".
separate location and query; datatopost="name=daniel&project=curl"
References TrackerHTTP::curlPtr, TrackerHTTP::outputLevel, and TrackerHTTP::serverList.
Referenced by TrackerHTTP::post_finish(), and TrackerHTTP::post_start().