26 #if defined (HAVE_CONFIG_H)
105 sys::resource_usage rusage;
107 sys::cpu_time cpu = rusage.cpu ();
109 tv_map.
assign (
"sec", cpu.user_sec ());
110 tv_map.
assign (
"usec", cpu.user_usec ());
113 tv_map.
assign (
"sec", cpu.system_sec ());
114 tv_map.
assign (
"usec", cpu.system_usec ());
117 ru_map.
assign (
"maxrss",
static_cast<double> (rusage.maxrss ()));
118 ru_map.
assign (
"ixrss",
static_cast<double> (rusage.ixrss ()));
119 ru_map.
assign (
"idrss",
static_cast<double> (rusage.idrss ()));
120 ru_map.
assign (
"isrss",
static_cast<double> (rusage.isrss ()));
121 ru_map.
assign (
"minflt",
static_cast<double> (rusage.minflt ()));
122 ru_map.
assign (
"majflt",
static_cast<double> (rusage.majflt ()));
123 ru_map.
assign (
"nswap",
static_cast<double> (rusage.nswap ()));
124 ru_map.
assign (
"inblock",
static_cast<double> (rusage.inblock ()));
125 ru_map.
assign (
"oublock",
static_cast<double> (rusage.oublock ()));
126 ru_map.
assign (
"msgsnd",
static_cast<double> (rusage.msgsnd ()));
127 ru_map.
assign (
"msgrcv",
static_cast<double> (rusage.msgrcv ()));
128 ru_map.
assign (
"nsignals",
static_cast<double> (rusage.nsignals ()));
129 ru_map.
assign (
"nvcsw",
static_cast<double> (rusage.nvcsw ()));
130 ru_map.
assign (
"nivcsw",
static_cast<double> (rusage.nivcsw ()));
void assign(const std::string &k, const octave_value &val)
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
octave_value_list ovl(const OV_Args &... args)
Construct an octave_value_list with less typing.