[Kde-cygwin-cvs] CVS: tools/profiler test.cpp,1.9,1.10 configure.in,1.8,1.9
Status: Inactive
Brought to you by:
habacker
From: Ralf H. <hab...@us...> - 2005-10-14 13:16:18
|
Update of /cvsroot/kde-cygwin/tools/profiler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30357 Modified Files: test.cpp configure.in Log Message: more dos to unix Index: test.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/tools/profiler/test.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- test.cpp 11 Apr 2002 19:02:18 -0000 1.9 +++ test.cpp 14 Oct 2005 13:15:58 -0000 1.10 @@ -1,69 +1,69 @@ -#include <stdlib.h> -#include <stdio.h> -#include <sys/unistd.h> -#include "profiler.h" - -void MacroTest(void) { - Profile - usleep(100000); -} - -void EmptyTest(void) -{ - Profiler x(__FUNCTION__); -} - -void SimpleTest(void) -{ - Profiler x(__FUNCTION__); - usleep(100000); -} - - -void MultipleTest(void) -{ - Profiler x(__FUNCTION__); - printf("%s\n",x.getKey()); - KProfiler y(__FUNCTION__); - printf("%s\n",y.getKey()); - QProfiler z(__FUNCTION__); - printf("%s\n",z.getKey()); - usleep(100000); -} - -void CounterTest(void) -{ - { - Profiler x("Counter=1"); - usleep(10000); - } -#ifndef NO_COUNT - { - Profiler x("Counter=100",100); - for(int i = 0; i < 100; i++) - usleep(10000); - } -#endif -} - -int main(int argc, char **argv) -{ - for (int i = 0; i < 100; i++) - EmptyTest(); - - SimpleTest(); - - MultipleTest(); - - for (int i = 0; i < 10; i++) - MacroTest(); - - for (int i = 0; i < 5; i++) - SimpleTest(); - - CounterTest(); - -// theProfiler.Print(); -} - - +#include <stdlib.h> +#include <stdio.h> +#include <sys/unistd.h> +#include "profiler.h" + +void MacroTest(void) { + Profile + usleep(100000); +} + +void EmptyTest(void) +{ + Profiler x(__FUNCTION__); +} + +void SimpleTest(void) +{ + Profiler x(__FUNCTION__); + usleep(100000); +} + + +void MultipleTest(void) +{ + Profiler x(__FUNCTION__); + printf("%s\n",x.getKey()); + KProfiler y(__FUNCTION__); + printf("%s\n",y.getKey()); + QProfiler z(__FUNCTION__); + printf("%s\n",z.getKey()); + usleep(100000); +} + +void CounterTest(void) +{ + { + Profiler x("Counter=1"); + usleep(10000); + } +#ifndef NO_COUNT + { + Profiler x("Counter=100",100); + for(int i = 0; i < 100; i++) + usleep(10000); + } +#endif +} + +int main(int argc, char **argv) +{ + for (int i = 0; i < 100; i++) + EmptyTest(); + + SimpleTest(); + + MultipleTest(); + + for (int i = 0; i < 10; i++) + MacroTest(); + + for (int i = 0; i < 5; i++) + SimpleTest(); + + CounterTest(); + +// theProfiler.Print(); +} + + Index: configure.in =================================================================== RCS file: /cvsroot/kde-cygwin/tools/profiler/configure.in,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- configure.in 28 May 2002 06:28:31 -0000 1.8 +++ configure.in 14 Oct 2005 13:15:58 -0000 1.9 @@ -1,31 +1,31 @@ -dnl Process this file with autoconf to produce a configure script. -AC_INIT(profiler.cpp) - -AC_PREREQ(2.50) - -AC_CONFIG_AUX_DIR(admin) - -AC_PROG_CXX - -dnl Automake doc recommends to do this only here. (Janos) -AM_INIT_AUTOMAKE(profiler, 1.3.5) - -#AM_CONFIG_HEADER(config.h) - -AC_ENABLE_SHARED -AC_DISABLE_STATIC -AC_PROG_LIBTOOL - -dnl Checks for libraries. - -dnl Checks for header files. -#AC_HEADER_STDC - -AC_OUTPUT([Makefile]) - -echo "" -echo "Please run the following targets for building distributions." -echo "" -echo "make bindist - for creating a binary distribution in this location" -echo "make srcdist - for creating a src distribution in this location" -echo "" +dnl Process this file with autoconf to produce a configure script. +AC_INIT(profiler.cpp) + +AC_PREREQ(2.50) + +AC_CONFIG_AUX_DIR(admin) + +AC_PROG_CXX + +dnl Automake doc recommends to do this only here. (Janos) +AM_INIT_AUTOMAKE(profiler, 1.3.5) + +#AM_CONFIG_HEADER(config.h) + +AC_ENABLE_SHARED +AC_DISABLE_STATIC +AC_PROG_LIBTOOL + +dnl Checks for libraries. + +dnl Checks for header files. +#AC_HEADER_STDC + +AC_OUTPUT([Makefile]) + +echo "" +echo "Please run the following targets for building distributions." +echo "" +echo "make bindist - for creating a binary distribution in this location" +echo "make srcdist - for creating a src distribution in this location" +echo "" |