projects
/
archipelago
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix mt-mapperd pithos read bug. plus some minor fixes
[archipelago]
/
xseg
/
xtypes
/
xobj_test.c
diff --git
a/xseg/xtypes/xobj_test.c
b/xseg/xtypes/xobj_test.c
index
6d228c2
..
5d71e88
100644
(file)
--- a/
xseg/xtypes/xobj_test.c
+++ b/
xseg/xtypes/xobj_test.c
@@
-135,10
+135,13
@@
int basic_test()
timersub(&end, &start, &end);
unsigned long us;
us = end.tv_sec * 1000000 + end.tv_usec;
timersub(&end, &start, &end);
unsigned long us;
us = end.tv_sec * 1000000 + end.tv_usec;
- printf("Allocated %lu objects\n", c);
+ printf("Allocated %lu objects of size %d (Total size: %lu)\n",
+ c, sizeof(struct foo), c*sizeof(struct foo));
printf("Total time: %lu us\n", us);
unsigned long tpa = (unsigned long) ((us*1000) / allocations);
printf("Total time: %lu us\n", us);
unsigned long tpa = (unsigned long) ((us*1000) / allocations);
- printf("Time per allocation: %lu ns\n\n", tpa);
+ printf("Time per allocation: %lu ns\n", tpa);
+ unsigned long aps = (unsigned long) ((allocations * 1000000)/us);
+ printf("Allocations per second: %lu\n\n", aps);
return 0;
}
return 0;
}