& section,
53 const string& param_name)
61 const string& section,
62 const string& param_name)
70 const string& section,
71 const string& param_name)
79 const string& section,
80 const string& param_name)
82 stringreg_value = reg.
GetString(section, param_name,
"");
84 if(reg_value.empty())
90 size_tparts_count = parts.size();
92 if(parts_count != 1 && parts_count != 2)
94 "Unexpected format of the ["+ section +
"]/"+
95param_name +
" parameter. Expected: F:Ff [Fb-Fe]");
97 if(parts_count == 2) {
99list<string> range_parts;
103 if(range_parts.size() != 2)
105 "Unexpected range format of the ["+ section +
"]/"+
106param_name +
" parameter. Expected: Fb-Fe");
112 "Incorrect range specification for ["+ section +
"]/"+
113param_name +
" parameter. " 114 "End value must be >= begin value.");
118list<string> val_freq_parts;
121 if(val_freq_parts.size() != 1 && val_freq_parts.size() != 2)
123 "Unexpected value and frequence format of the ["+
124section +
"]/"+ param_name +
" parameter. Expected: F:Ff");
125 else if(val_freq_parts.size() == 1)
129 value= val_freq_parts.front();
154 const stringsname =
"server";
237 if(!reg.
HasEntry(sname,
"path"))
239 "Mandatory parameter ["+ sname +
"]/path is not found.");
243 "Mandatory parameter ["+ sname +
244 "]/path cannot be an empty string.");
260 "state_transition_perf_log_queues",
kEmptyStr);
262 "state_transition_perf_log_classes",
kEmptyStr);
266 #if defined(_DEBUG) && !defined(NDEBUG) 272 #if defined(_DEBUG) && !defined(NDEBUG) 278 "Unexpected value of the [error_emulator]/fd_report " 279 " parameter. It must be >= 0");
283 "Unexpected value of the [error_emulator]/mem_report " 284 " parameter. It must be >= 0");
288 "Unexpected value of the [error_emulator]/delay " 289 " parameter. It must be >= 0");
291 "drop_before_reply");
293 "drop_after_reply");
295 "reply_with_garbage");
298 "please define [error_emulator]/garbage_data " 306 boolwell_formed =
true;
309well_formed =
false;
312well_formed =
false;
315well_formed =
false;
318well_formed =
false;
321well_formed =
false;
324well_formed =
false;
326 if(well_formed ==
false) {
336 const string& sname,
338 unsigned intdefault_max,
339 unsigned intdefault_high_mark_percentage,
340 unsigned intdefault_low_mark_percentage,
341 unsigned intdefault_high_removal,
342 unsigned intdefault_low_removal,
343 unsigned intdefault_dirt_percentage)
346 if(name ==
"affinity")
347plural =
"affinities";
349plural = name +
"s";
357default_high_mark_percentage);
359default_low_mark_percentage);
363default_dirt_percentage);
366default_low_mark_percentage,
367default_high_removal,
369default_dirt_percentage);
374 unsigned intdefault_high_mark_percentage,
375 unsigned intdefault_low_mark_percentage,
376 unsigned intdefault_high_removal,
377 unsigned intdefault_low_removal,
378 unsigned intdefault_dirt_percentage)
380 boolwell_formed =
true;
383well_formed =
false;
386well_formed =
false;
389well_formed =
false;
392well_formed =
false;
405 const string& prefix,
406 const string& suffix)
const 409 if(name ==
"affinity")
410plural =
"affinities";
412plural = name +
"s";
414 returnprefix +
"max_"+ plural +
"=\""+
416prefix + name +
"_high_mark_percentage=\""+
418prefix + name +
"_low_mark_percentage=\""+
420prefix + name +
"_high_removal=\""+
422prefix + name +
"_low_removal=\""+
424prefix + name +
"_dirt_percentage=\""+
NetSchedule internal exception.
static CRequestContext & GetRequestContext(void)
Shortcut to CDiagContextThreadData::GetThreadData().GetRequestContext()
TCount GetRequestID(void) const
Get request ID (or zero if not set).
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
uint64_t Uint8
8-byte (64-bit) unsigned integer
virtual bool HasEntry(const string §ion, const string &name=kEmptyStr, TFlags flags=0) const
string GetEncryptedString(const string §ion, const string &name, TFlags flags=0, const string &password=kEmptyStr) const
Get a value that was (potentially) stored encrypted.
virtual string GetString(const string §ion, const string &name, const string &default_value, TFlags flags=0) const
Get the parameter string value.
static bool StringToBool(const CTempString str)
Convert string to bool.
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
static double StringToDouble(const CTempStringEx str, TStringToNumFlags flags=0)
Convert string to double.
static unsigned long StringToULong(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to unsigned long.
static unsigned int StringToUInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to unsigned int.
static string TruncateSpaces(const string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string.
@ fSplit_MergeDelimiters
Merge adjacent delimiters.
unsigned int max_threads
Maximum simultaneous threads.
unsigned int max_connections
Maximum # of open connections.
unsigned int init_threads
Number of initial threads.
NetSchedule client specs.
const bool default_log_batch_each_job
const unsigned int default_group_low_removal
const unsigned int default_affinity_low_mark_percentage
const unsigned int default_group_dirt_percentage
const unsigned int default_max_threads
const unsigned int default_scope_high_removal
const unsigned int default_scope_high_mark_percentage
const double default_purge_timeout
const unsigned int default_group_high_mark_percentage
const unsigned int default_init_threads
const unsigned int default_stat_interval
const bool default_log_cleaning_thread
const unsigned int default_max_scopes
const bool default_log_execution_watcher_thread
const unsigned int default_max_client_data
const unsigned int default_max_groups
const unsigned int default_group_high_removal
const bool default_log_notification_thread
const unsigned int default_group_low_mark_percentage
const unsigned int default_scope_low_removal
const unsigned int default_markdel_batch_size
const unsigned int default_max_queues
const bool default_is_log
const unsigned int default_affinity_low_removal
const unsigned int default_reserve_dump_space
const unsigned int default_affinity_high_mark_percentage
const unsigned int default_del_batch_size
const unsigned int default_job_counters_interval
const unsigned int default_scope_low_mark_percentage
const unsigned int max_connections_low_limit
const unsigned int default_max_connections
const unsigned int default_affinity_high_removal
const unsigned int default_max_affinities
const unsigned int default_scope_dirt_percentage
const bool default_log_statistics_thread
const bool default_use_hostname
const unsigned int max_connections_high_limit
const unsigned int default_affinity_dirt_percentage
const unsigned int default_scan_batch_size
const bool default_diskless
const unsigned int default_network_timeout
#define GetBoolNoErr(name, dflt)
#define GetIntNoErr(name, dflt)
#define GetDoubleNoErr(name, dflt)
unsigned int NS_GetDataSize(const IRegistry ®, const string §ion, const string &entry, unsigned int default_val)
Defines CRequestContext class for NCBI C++ diagnostic API.
bool IsActive(void) const
void x_ReadCommon(const IRegistry ®, const string §ion, const string ¶m_name)
void ReadInt(const IRegistry ®, const string §ion, const string ¶m_name)
void ReadDouble(const IRegistry ®, const string §ion, const string ¶m_name)
void ReadBool(const IRegistry ®, const string §ion, const string ¶m_name)
string Serialize(const string &name, const string &prefix, const string &suffix) const
void x_CheckGarbageCollectorSettings(unsigned int default_high_mark_percentage, unsigned int default_low_mark_percentage, unsigned int default_high_removal, unsigned int default_low_removal, unsigned int default_dirt_percentage)
unsigned int low_mark_percentage
unsigned int dirt_percentage
unsigned int high_mark_percentage
void Read(const IRegistry ®, const string &sname, const string &name, unsigned int default_max, unsigned int default_high_mark_percentage, unsigned int default_low_mark_percentage, unsigned int default_high_removal, unsigned int default_low_removal, unsigned int default_dirt_percentage)
unsigned int high_removal
SNSRegistryParameters group_reg
void x_CheckJobGarbageCollectorSettings(void)
string state_transition_perf_log_classes
unsigned int del_batch_size
SErrorEmulatorParameter debug_mem_count
string state_transition_perf_log_queues
SErrorEmulatorParameter debug_fd_count
unsigned int stat_interval
unsigned int markdel_batch_size
SErrorEmulatorParameter debug_write_delay
bool log_notification_thread
unsigned int reserve_dump_space
SNSRegistryParameters affinity_reg
void ReadErrorEmulatorSection(const IRegistry ®)
SErrorEmulatorParameter debug_conn_drop_after_write
SErrorEmulatorParameter debug_conn_drop_before_write
unsigned int scan_batch_size
string admin_client_names
SErrorEmulatorParameter debug_reply_with_garbage
unsigned int job_counters_interval
SNSRegistryParameters scope_reg
unsigned int max_client_data
void Read(const IRegistry ®)
bool log_statistics_thread
bool log_execution_watcher_thread
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4