Add a trivial benchmark for wxDateTime::ParseDate().
Add a test to check the performance of this method. See #13242. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67775 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
20
tests/benchmarks/datetime.cpp
Normal file
20
tests/benchmarks/datetime.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user