Go to the documentation of this file.
18 #include <FreeNOS/System.h>
48 printf(
"SystemCall (GetPID) Ticks: %u\r\n", t2 - t1);
54 printf(
"SystemCall (InfoPID) Ticks: %u\r\n", t2 - t1);
60 printf(
"SystemCall (Schedule) Ticks: %u\r\n", t2 - t1);
63 range.
virt = 0x80000000;
68 printf(
"SystemCall (VMCtl) Ticks: %u\r\n", t2 - t1);
74 printf(
"IPC (stat) Ticks: %u\r\n", t2 - t1);
78 for (
int i = 0; i < 128; i++)
79 foo[i] =
new char[16];
81 printf(
"allocate() Ticks: %u (%u AVG)\r\n",
82 (
u32)(t2 - t1), (
u32)(t2 - t1) / 128);
86 for (
int i = 0; i < 128; i++)
89 printf(
"release() Ticks: %u (%u AVG)\r\n",
90 (
u32)(t2 - t1), (
u32)(t2 - t1) / 128);
The <sys/stat.h> header shall define the stat structure.
Process information structure, used for Info.
u64 timestamp()
Reads the CPU's timestamp counter.
#define PAGESIZE
ARM uses 4K pages.
POSIX-compatible application.
unsigned long Address
A memory address.
API::Result VMCtl(const ProcessID procID, const MemoryOperation op, Memory::Range *range=ZERO)
Prototype for user applications.
void setDescription(const String &desc)
Set program description.
API::Result ProcessCtl(const ProcessID proc, const ProcessOperation op, const Address addr=0, const Address output=0)
Prototype for user applications.
unsigned long long u64
Unsigned 64-bit number.
int printf(const char *format,...)
Output a formatted string to standard output.
unsigned int u32
Unsigned 32-bit number.
virtual Result exec()
Execute the application.
int stat(const char *path, struct stat *buf)
Get file status.
virtual ~BenchMark()
Destructor.
BenchMark(int argc, char **argv)
Constructor.
ArgumentParser & parser()
Get program arguments parser.
Address virt
Virtual address.
Size size
Size in number of bytes.