Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

cvs commit: logging-log4cxx/performance main.cpp: msg#00045

apache.logging.log4cxx.devel

Subject: cvs commit: logging-log4cxx/performance main.cpp

carnold 2005/03/18 21:01:04

Modified: performance main.cpp
Log:
LOGCXX-10: Skip wide perf test if no wchar_t type

Revision Changes Path
1.18 +14 -7 logging-log4cxx/performance/main.cpp

Index: main.cpp
===================================================================
RCS file: /home/cvs/logging-log4cxx/performance/main.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- main.cpp 15 Feb 2005 23:56:00 -0000 1.17
+++ main.cpp 19 Mar 2005 05:01:04 -0000 1.18
@@ -99,16 +99,18 @@
if (args.size() == 3) {
if(args[2] == LOG4CXX_STR("char")) {
loop = Loop::loopChar;
- } else if (args[2] == LOG4CXX_STR("wide")) {
- loop = Loop::loopWide;
} else if (args[2] == LOG4CXX_STR("stream")) {
loop = Loop::loopStream;
- } else if (args[2] == LOG4CXX_STR("wide-stream")) {
- loop = Loop::loopWideStream;
} else if (args[2] == LOG4CXX_STR("bad-stream")) {
loop = Loop::loopBadStream;
+#if LOG4CXX_HAS_WCHAR_T
+ } else if (args[2] == LOG4CXX_STR("wide")) {
+ loop = Loop::loopWide;
+ } else if (args[2] == LOG4CXX_STR("wide-stream")) {
+ loop = Loop::loopWideStream;
} else if (args[2] == LOG4CXX_STR("bad-wide-stream")) {
loop = Loop::loopBadWideStream;
+#endif
} else {
usage("Unrecognized loop type.");
}
@@ -124,6 +126,7 @@
return (apr_time_now() - before) / 1000;
}

+ #if LOG4CXX_HAS_WCHAR_T
static long loopWide(long len, LoggerPtr& logger) {
const wchar_t* msg = L"Some fix message of medium length.";
apr_time_t before = apr_time_now();
@@ -132,6 +135,7 @@
}
return (apr_time_now() - before) / 1000;
}
+#endif

static long loopStream(long len, LoggerPtr& logger) {
const char* msg = "Some fix message of medium length.";
@@ -143,7 +147,8 @@
return (apr_time_now() - before) / 1000;
}

- static long loopWideStream(long len, LoggerPtr& logger) {
+#if LOG4CXX_HAS_WCHAR_T
+ static long loopWideStream(long len, LoggerPtr& logger) {
const wchar_t* msg = L"Some fix message of medium length.";
apr_time_t before = apr_time_now();
logstream ls(logger, Level::DEBUG);
@@ -152,6 +157,7 @@
}
return (apr_time_now() - before) / 1000;
}
+#endif

static long loopBadStream(long len, LoggerPtr& logger) {
const char* msg = "Some fix message of medium length.";
@@ -163,7 +169,8 @@
return (apr_time_now() - before) / 1000;
}

- static long loopBadWideStream(long len, LoggerPtr& logger) {
+#if LOG4CXX_HAS_WCHAR_T
+ static long loopBadWideStream(long len, LoggerPtr& logger) {
const wchar_t* msg = L"Some fix message of medium length.";
apr_time_t before = apr_time_now();
for (int i = 0; i < len; i++) {
@@ -172,7 +179,7 @@
}
return (apr_time_now() - before) / 1000;
}
-
+#endif

};







<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qplus.devel/200...    network.jabber....    debian.qa-packa...    encryption.gpg....    python.dabo.dev...    uclinux.devel/2...    science.mathema...    recreation.pesc...    kernel.ck/2004-...    mozilla.devel.e...    tex.latex.prosp...    ietf.multi6/200...    bbc.cvs/2002-11...    xfree86.newbie/...    jakarta.taglibs...    altlinux.hardwa...    comedi/2002-05/...    horde.bugs/2004...    games.diplomacy...    finance.e-gold....    web.dom.test-su...    lang.ruby.rails...    os.netbsd.devel...    video.gstreamer...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation