Skip to content

Commit

Permalink
[SSI] Allow client-side to request high resolution timestamps.
Browse files Browse the repository at this point in the history
  • Loading branch information
abh3 committed Jan 23, 2021
1 parent d3c1e34 commit c2e3ae4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/XrdSsi/XrdSsiClient.cc
Expand Up @@ -81,6 +81,7 @@ extern XrdSsiLogger::MCB_t *msgCBCl;
bool dsTTLSet = false;
bool reqTOSet = false;
bool strTOSet = false;
bool hiResTime= false;

static const int rDispNone = 0;
static const int rDispRand = -1;
Expand Down Expand Up @@ -237,6 +238,7 @@ bool XrdSsiClientProvider::SetConfig(XrdSsiErrInfo &eInfo,
maxTCB = static_cast<short>(optvalue);
clMutex.UnLock();
}
else if (optname == "hiResTime") hiResTime = true;
else if (optname == "netThreads")
{if (optvalue < 1)
{eInfo.Set("invalid netThreads value.", EINVAL); return false;}
Expand Down Expand Up @@ -285,6 +287,7 @@ void XrdSsiClientProvider::SetLogger()
// Now we need to get a logger object. We make this a real dumb one.
//
Logger = new XrdSysLogger(eFD, 0);
if (hiResTime || getenv("XRDSSI_HIRESLOG")) Logger->setHiRes();
Log.logger(Logger);
Trace.SetLogger(Logger);
if (getenv("XRDSSIDEBUG") != 0) Trace.What = TRACESSI_Debug;
Expand Down
6 changes: 5 additions & 1 deletion src/XrdSsi/XrdSsiProvider.hh
Expand Up @@ -252,12 +252,16 @@ virtual void SetCBThreads(int cbNum, int ntNum=0) {(void)cbNum; (void)ntNum;}
//-----------------------------------------------------------------------------

/*! The following table list the currently supported keynames and what the
value actually does. These options only apply to the client.
value actually does. These options only apply to the client. The options
must be set before calling GetService().
cbThreads The maximum number of threads to be used for callbacks and
sets the maximum number of active callbacks (default 300).
set a value between 1 and 32767. Note: the nproc ulimit
is final arbiter of the actual number of threads to use.
hiResTime enables the use of a high resolution timer in log message
timestamps. The optvalue is immaterial as this simply sets
feature on and once set on cannot be set off.
netThreads The maximum number of threads to be used to handle network
traffic. The minimum is 3, the default is 10% of cbThreads
but no more than 100.
Expand Down

0 comments on commit c2e3ae4

Please sign in to comment.