![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
◆ MapOtherSteps
◆ MapStdSteps
◆ OtherKey
◆ ATLAS_NOT_THREAD_SAFE()
double get_malloc_kb PMonSD::ATLAS_NOT_THREAD_SAFE |
( |
| ) |
|
◆ bogomips()
◆ clock_nooverflow()
int64_t PMonSD::clock_nooverflow |
( |
| ) |
|
|
inline |
Definition at line 523 of file SemiDetMisc.h.
530 assert(std::numeric_limits<clock_t>::is_integer);
531 if (
sizeof(clock_t)>=
sizeof(int64_t))
535 static clock_t last=clock();
◆ cpu_model()
std::string PMonSD::cpu_model |
( |
| ) |
|
|
inline |
◆ envvar()
◆ envvar_is_set()
bool PMonSD::envvar_is_set |
( |
const char * |
e | ) |
|
|
inline |
Definition at line 379 of file SemiDetMisc.h.
381 if (!
c)
return false;
382 return strncmp(
c,
"1",2)==0;
◆ get_absolute_wall_ms()
double PMonSD::get_absolute_wall_ms |
( |
| ) |
|
|
inline |
Definition at line 402 of file SemiDetMisc.h.
405 int err=gettimeofday(&tv, 0);
409 return 0.001*res_usec;
◆ get_cpu_ms()
double PMonSD::get_cpu_ms |
( |
| ) |
|
|
inline |
◆ get_field()
std::string PMonSD::get_field |
( |
const char * |
filename, |
|
|
const std::string & |
fieldname, |
|
|
char |
space = '_' |
|
) |
| |
|
inline |
Definition at line 318 of file SemiDetMisc.h.
328 while (fgets(
line, 256,
file) != NULL){
329 if (strncmp(
line, fieldname.c_str(), fieldname.size()) == 0) {
330 size_t pos = std::string(
line).find(
':', fieldname.size() );
331 if (
pos==std::string::npos) {
336 bool ignore_nextspace=
true;
342 if (ignore_nextspace)
344 ignore_nextspace=
true;
348 ignore_nextspace=
false;
◆ get_rss_kb()
double PMonSD::get_rss_kb |
( |
| ) |
|
|
inline |
◆ get_vmem_kb()
double PMonSD::get_vmem_kb |
( |
| ) |
|
|
inline |
◆ get_vmem_rss_kb()
void PMonSD::get_vmem_rss_kb |
( |
double & |
vmem, |
|
|
double & |
rss, |
|
|
bool |
vmemonly = false |
|
) |
| |
|
inline |
Definition at line 447 of file SemiDetMisc.h.
454 int fd =
open(
"/proc/self/statm", O_RDONLY);
460 static const float pg_size_in_kb = sysconf(_SC_PAGESIZE)/1024.0;
465 for (
unsigned i=0;
i+1<
sizeof(
data);++
i)
◆ get_wall_ms()
double PMonSD::get_wall_ms |
( |
| ) |
|
|
inline |
◆ jobstart_jiffy2unix_ms()
double PMonSD::jobstart_jiffy2unix_ms |
( |
const std::string & |
s | ) |
|
|
inline |
Definition at line 426 of file SemiDetMisc.h.
427 const double d=strtod(&(
s[0]),0);
if (
d<=0.)
return 0;
430 return 1000.0*(
d*spj+
b);
◆ secs_per_jiffy()
double PMonSD::secs_per_jiffy |
( |
| ) |
|
|
inline |
Definition at line 412 of file SemiDetMisc.h.
417 long tick=sysconf(_SC_CLK_TCK);
418 if (tick>=1&&tick<1000000)
422 clock_t
t0=clock(); clock_t
t1=
t0;
while (
t1==
t0)
t1=clock();
◆ setUTCTimeString()
void PMonSD::setUTCTimeString |
( |
std::string & |
s, |
|
|
double |
offset_ms = 0 |
|
) |
| |
|
inline |
Definition at line 611 of file SemiDetMisc.h.
616 time_t
t =
time(NULL);
618 t+=
static_cast<time_t
>(0.5+0.001*offset_ms);
623 size_t r = strftime(&(
s[0]),25,
"%Y-%m-%dT%H:%M:%S+0000",&ptm);
624 if (
r>0&&
r<25)
s.resize(
r);
625 else s=
"0000-00-00T00:00:00+0000";
◆ symb2lib()
const char* PMonSD::symb2lib |
( |
const char * |
symbol, |
|
|
const char * |
failstr = "unknown" |
|
) |
| |
|
inline |
Definition at line 433 of file SemiDetMisc.h.
434 void * addr = dlsym(RTLD_DEFAULT,symbol);
435 if (!addr)
return failstr;
437 if (!dladdr(addr, &di))
return failstr;
438 if (!di.dli_fname)
return failstr;
◆ system_boot_time_seconds()
unsigned long PMonSD::system_boot_time_seconds |
( |
| ) |
|
|
inline |
Definition at line 384 of file SemiDetMisc.h.
386 FILE*
file = fopen(
"/proc/stat",
"r");
390 while (fgets(
line, 32,
file) != NULL){
391 if (strncmp(
line,
"btime ", 6) == 0) {
393 sscanf(&(
line[6]),
"%80lu",&
l);
◆ vmpeak()
unsigned PMonSD::vmpeak |
( |
| ) |
|
|
inline |
Definition at line 302 of file SemiDetMisc.h.
304 FILE*
file = fopen(
"/proc/self/status",
"r");
309 while (fgets(
line, 256,
file) != NULL){
310 if (strncmp(
line,
"VmPeak:", 7) == 0) {
IovVectorMap_t read(const Folder &theFolder, const SelectionCriterion &choice, const unsigned int limit=10)
char data[hepevt_bytes_allocation_ATLAS]
double get_absolute_wall_ms()
std::vector< ALFA_RawData_p1 > t0
std::vector< ALFA_RawDataCollection_p1 > t1
unsigned long system_boot_time_seconds()
std::string get_field(const char *filename, const std::string &fieldname, char space='_')
double atof(std::string_view str)
Converts a string into a double / float.
std::string getenv(const std::string &variableName)
get an environment variable
def time(flags, cells_name, *args, **kw)
void get_vmem_rss_kb(double &vmem, double &rss, bool vmemonly=false)
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
int64_t clock_nooverflow()