$(CXXFLAGS)
BENCH_OBJECTS = \
bench_bench.o \
+ bench_datetime.o \
bench_htmlpars.o \
bench_htmltag.o \
bench_ipcclient.o \
bench_bench.o: $(srcdir)/bench.cpp
$(CXXC) -c -o $@ $(BENCH_CXXFLAGS) $(srcdir)/bench.cpp
+bench_datetime.o: $(srcdir)/datetime.cpp
+ $(CXXC) -c -o $@ $(BENCH_CXXFLAGS) $(srcdir)/datetime.cpp
+
bench_htmlpars.o: $(srcdir)/htmlparser/htmlpars.cpp
$(CXXC) -c -o $@ $(BENCH_CXXFLAGS) $(srcdir)/htmlparser/htmlpars.cpp
template_append="wx_append_base">
<sources>
bench.cpp
+ datetime.cpp
htmlparser/htmlpars.cpp
htmlparser/htmltag.cpp
ipcclient.cpp
# End Source File\r
# Begin Source File\r
\r
+SOURCE=.\datetime.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
SOURCE=.\htmlparser\htmlpars.cpp\r
# End Source File\r
# Begin Source File\r
<File\r
RelativePath=".\bench.cpp">\r
</File>\r
+ <File\r
+ RelativePath=".\datetime.cpp">\r
+ </File>\r
<File\r
RelativePath=".\htmlparser\htmlpars.cpp">\r
</File>\r
RelativePath=".\bench.cpp"\r
>\r
</File>\r
+ <File\r
+ RelativePath=".\datetime.cpp"\r
+ >\r
+ </File>\r
<File\r
RelativePath=".\htmlparser\htmlpars.cpp"\r
>\r
RelativePath=".\bench.cpp"\r
>\r
</File>\r
+ <File\r
+ RelativePath=".\datetime.cpp"\r
+ >\r
+ </File>\r
<File\r
RelativePath=".\htmlparser\htmlpars.cpp"\r
>\r
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: tests/benchmarks/datetime.cpp
+// Purpose: wxDateTime benchmarks
+// Author: Vadim Zeitlin
+// Created: 2011-05-23
+// RCS-ID: $Id$
+// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#include "wx/datetime.h"
+
+#include "bench.h"
+
+BENCHMARK_FUNC(ParseDate)
+{
+ wxDateTime dt;
+ return dt.ParseDate("May 23, 2011") && dt.GetMonth() == wxDateTime::May;
+}
+
$(CPPFLAGS) $(CXXFLAGS)\r
BENCH_OBJECTS = \\r
$(OBJS)\bench_bench.obj \\r
+ $(OBJS)\bench_datetime.obj \\r
$(OBJS)\bench_htmlpars.obj \\r
$(OBJS)\bench_htmltag.obj \\r
$(OBJS)\bench_ipcclient.obj \\r
$(OBJS)\bench_bench.obj: .\bench.cpp\r
$(CXX) -q -c -P -o$@ $(BENCH_CXXFLAGS) .\bench.cpp\r
\r
+$(OBJS)\bench_datetime.obj: .\datetime.cpp\r
+ $(CXX) -q -c -P -o$@ $(BENCH_CXXFLAGS) .\datetime.cpp\r
+\r
$(OBJS)\bench_htmlpars.obj: .\htmlparser\htmlpars.cpp\r
$(CXX) -q -c -P -o$@ $(BENCH_CXXFLAGS) .\htmlparser\htmlpars.cpp\r
\r
$(CXXFLAGS)\r
BENCH_OBJECTS = \\r
$(OBJS)\bench_bench.o \\r
+ $(OBJS)\bench_datetime.o \\r
$(OBJS)\bench_htmlpars.o \\r
$(OBJS)\bench_htmltag.o \\r
$(OBJS)\bench_ipcclient.o \\r
$(OBJS)\bench_bench.o: ./bench.cpp\r
$(CXX) -c -o $@ $(BENCH_CXXFLAGS) $(CPPDEPS) $<\r
\r
+$(OBJS)\bench_datetime.o: ./datetime.cpp\r
+ $(CXX) -c -o $@ $(BENCH_CXXFLAGS) $(CPPDEPS) $<\r
+\r
$(OBJS)\bench_htmlpars.o: ./htmlparser/htmlpars.cpp\r
$(CXX) -c -o $@ $(BENCH_CXXFLAGS) $(CPPDEPS) $<\r
\r
$(CXXFLAGS)\r
BENCH_OBJECTS = \\r
$(OBJS)\bench_bench.obj \\r
+ $(OBJS)\bench_datetime.obj \\r
$(OBJS)\bench_htmlpars.obj \\r
$(OBJS)\bench_htmltag.obj \\r
$(OBJS)\bench_ipcclient.obj \\r
$(OBJS)\bench_bench.obj: .\bench.cpp\r
$(CXX) /c /nologo /TP /Fo$@ $(BENCH_CXXFLAGS) .\bench.cpp\r
\r
+$(OBJS)\bench_datetime.obj: .\datetime.cpp\r
+ $(CXX) /c /nologo /TP /Fo$@ $(BENCH_CXXFLAGS) .\datetime.cpp\r
+\r
$(OBJS)\bench_htmlpars.obj: .\htmlparser\htmlpars.cpp\r
$(CXX) /c /nologo /TP /Fo$@ $(BENCH_CXXFLAGS) .\htmlparser\htmlpars.cpp\r
\r
$(__EXCEPTIONSFLAG_8) $(CPPFLAGS) $(CXXFLAGS)\r
BENCH_OBJECTS = &\r
$(OBJS)\bench_bench.obj &\r
+ $(OBJS)\bench_datetime.obj &\r
$(OBJS)\bench_htmlpars.obj &\r
$(OBJS)\bench_htmltag.obj &\r
$(OBJS)\bench_ipcclient.obj &\r
$(OBJS)\bench_bench.obj : .AUTODEPEND .\bench.cpp\r
$(CXX) -bt=nt -zq -fo=$^@ $(BENCH_CXXFLAGS) $<\r
\r
+$(OBJS)\bench_datetime.obj : .AUTODEPEND .\datetime.cpp\r
+ $(CXX) -bt=nt -zq -fo=$^@ $(BENCH_CXXFLAGS) $<\r
+\r
$(OBJS)\bench_htmlpars.obj : .AUTODEPEND .\htmlparser\htmlpars.cpp\r
$(CXX) -bt=nt -zq -fo=$^@ $(BENCH_CXXFLAGS) $<\r
\r