bigread.cpp Source File (kabc Library)

| # kabc Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# bigread.cpp

    00001 #include <sys/times.h>
    00002
    00003 #include <kaboutdata.h>
    00004 #include <kapplication.h>
    00005 #include <kdebug.h>
    00006 #include <klocale.h>
    00007 #include <kcmdlineargs.h>
    00008
    00009 #include "addressbook.h"
    00010 #include "vcardformat.h"
    00011 #include "resourcefile.h"
    00012 #if 0
    00013 #include "resourcesql.h"
    00014 #endif
    00015
    00016 using namespace KABC;
    00017
    00018 int main(int argc,char **argv)
    00019 {
    00020   KAboutData aboutData("bigtest","BigTestKabc","0.1");
    00021   KCmdLineArgs::init(argc,argv,&aboutData);
    00022
    00023   KApplication app;
    00024
    00025   AddressBook ab;
    00026
    00027   ResourceFile r( &ab, "my.kabc" );
    00028   ab.addResource( &r );
    00029
    00030 #if 0
    00031   ResourceSql rsql( &ab, "root", "kde4ever", "localhost" );
    00032   ab.addResource( &rsql );
    00033 #endif
    00034
    00035   struct tms start;
    00036
    00037   times( &start );
    00038
    00039 #if 0
    00040   kdDebug() << "utime : " << int( start.tms_utime ) << endl;
    00041   kdDebug() << "stime : " << int( start.tms_stime ) << endl;
    00042   kdDebug() << "cutime: " << int( start.tms_cutime ) << endl;
    00043   kdDebug() << "cstime: " << int( start.tms_cstime ) << endl;
    00044 #endif
    00045
    00046   kdDebug() << "Start load" << endl;
    00047   ab.load();
    00048   kdDebug() << "Finished load" << endl;
    00049
    00050   struct tms end;
    00051
    00052   times( &end );
    00053
    00054 #if 0
    00055   kdDebug() << "utime : " << int( end.tms_utime ) << endl;
    00056   kdDebug() << "stime : " << int( end.tms_stime ) << endl;
    00057   kdDebug() << "cutime: " << int( end.tms_cutime ) << endl;
    00058   kdDebug() << "cstime: " << int( end.tms_cstime ) << endl;
    00059 #endif
    00060
    00061   kdDebug() << "UTime: " << int( end.tms_utime ) - int( start.tms_utime ) << endl;
    00062   kdDebug() << "STime: " << int( end.tms_stime ) - int( start.tms_stime ) << endl;
    00063
    00064   ab.dump();
    00065 }

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:29:18 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001