Add another syscall test, and test cvs commits after loginfo/commitinfo/config
authorMatthew Dillon <dillon@dragonflybsd.org>
Mon, 28 Mar 2005 03:13:26 +0000 (03:13 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Mon, 28 Mar 2005 03:13:26 +0000 (03:13 +0000)
updates.

test/sysperf/Makefile
test/sysperf/syscall5.c [new file with mode: 0644]
test/test/README

index 0283bdc..e9746d5 100644 (file)
@@ -1,8 +1,8 @@
 #
-# $DragonFly: src/test/sysperf/Makefile,v 1.10 2004/10/31 20:19:23 eirikn Exp $
+# $DragonFly: src/test/sysperf/Makefile,v 1.11 2005/03/28 03:13:24 dillon Exp $
 #
 
-TARGETS=/tmp/sc1 /tmp/sc2 /tmp/sc3 /tmp/sc4 \
+TARGETS=/tmp/sc1 /tmp/sc2 /tmp/sc3 /tmp/sc4 /tmp/sc5 \
        /tmp/loop1 /tmp/loop2 /tmp/loop3 \
        /tmp/call1 /tmp/call2 /tmp/call3 \
        /tmp/mt2 \
@@ -29,6 +29,9 @@ all:  $(TARGETS)
 /tmp/sc4: syscall4.c blib.c
        $(CC) $(CFLAGS) syscall4.c blib.c -o /tmp/sc4
 
+/tmp/sc5: syscall5.c blib.c
+       $(CC) $(CFLAGS) syscall5.c blib.c -o /tmp/sc5
+
 /tmp/fork1: fork1.c blib.c
        $(CC) $(CFLAGS) fork1.c blib.c -o /tmp/fork1
 
diff --git a/test/sysperf/syscall5.c b/test/sysperf/syscall5.c
new file mode 100644 (file)
index 0000000..a6f30e9
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * syscall1.c
+ *
+ * $DragonFly: src/test/sysperf/syscall5.c,v 1.1 2005/03/28 03:13:24 dillon Exp $
+ */
+
+#include "blib.h"
+
+int
+main(int ac, char **av)
+{
+    long long count = 0;
+    long long max;
+    struct timespec ts;
+    int j;
+
+    printf("timing standard clock_gettime() syscall\n");
+
+    start_timing();
+    while (stop_timing(0, NULL) == 0) {
+       for (j = 0; j < 100; ++j)
+           clock_gettime(CLOCK_REALTIME, &ts);
+       count += 100;
+    }
+    max = count;
+    start_timing();
+    for (count = 0; count < max; count += 100) {
+       for (j = 0; j < 100; ++j)
+           clock_gettime(CLOCK_REALTIME, &ts);
+    }
+    stop_timing(count, "getuid()");
+    return(0);
+}
+
index 6a8f4a1..b76d0ee 100644 (file)
@@ -1,4 +1,4 @@
-$DragonFly: src/test/test/README,v 1.35 2005/03/28 03:09:17 dillon Exp $
+$DragonFly: src/test/test/README,v 1.36 2005/03/28 03:13:26 dillon Exp $
                        README FOR /usr/src/test/test
 
     This is just a dummy directory that committers use to test the
@@ -6,3 +6,4 @@ $DragonFly: src/test/test/README,v 1.35 2005/03/28 03:09:17 dillon Exp $
 
     test1
     test2
+    test3