summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-06-24 17:56:23 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-06-24 17:56:23 +0000
commit7beb8539de2bc6cb27e25a07fb41429f68701022 (patch)
tree92ec5440659fe847bb740ccfb78d16cf65332153
parent35fdf83b04895b7012578e358f00a4a5c9a681eb (diff)
entered into RCS
-rw-r--r--benchmarks/Makefile7
-rw-r--r--benchmarks/forks.c5
2 files changed, 7 insertions, 5 deletions
diff --git a/benchmarks/Makefile b/benchmarks/Makefile
index 7755267e..9c105d7a 100644
--- a/benchmarks/Makefile
+++ b/benchmarks/Makefile
@@ -18,15 +18,12 @@
dir := benchmarks
include ../Makeconf
+CCTARGET=i386-gnu
-DIST_FILES =
+DIST_FILES = forks.c
all: forks
-OBJS=forks.o
-
-forks: $(OBJS) $(libc); $(link)
-
install: $(hurdroot) forks
$(INSTALL_BIN) forks $(hurdroot)/bin/forks
diff --git a/benchmarks/forks.c b/benchmarks/forks.c
index ae9efaab..2bb98a88 100644
--- a/benchmarks/forks.c
+++ b/benchmarks/forks.c
@@ -14,6 +14,7 @@ main(argc, argv)
register int nforks, i;
char *cp;
int pid, child, status, brksize;
+ int starttime, endtime;
if (argc < 2) {
printf("usage: %s number-of-forks sbrk-size\n", argv[0]);
@@ -29,6 +30,8 @@ main(argc, argv)
printf("%s: bad size to sbrk\n", argv[2]);
exit(3);
}
+
+ time (&starttime);
cp = (char *)sbrk(brksize);
if ((int)cp == -1) {
perror("sbrk");
@@ -47,5 +50,7 @@ main(argc, argv)
while ((pid = wait(&status)) != -1 && pid != child)
;
}
+ time (&endtime);
+ printf ("Time: %d seconds.\n", endtime - starttime);
exit(0);
}