Skip to content

Commit 221e8d5

Browse files
author
Steve Hanson
committed
revert perftest
1 parent f89e75a commit 221e8d5

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

test/perftest/schematest.cpp

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ RAPIDJSON_DIAG_POP
5151

5252
class Schema : public PerfTest {
5353
public:
54-
typedef GenericSchemaDocument<Value, MemoryPoolAllocator<> > SchemaDocumentType;
55-
5654
Schema() {}
5755

5856
virtual void SetUp() {
@@ -91,8 +89,6 @@ class Schema : public PerfTest {
9189

9290
char jsonBuffer[65536];
9391
MemoryPoolAllocator<> jsonAllocator(jsonBuffer, sizeof(jsonBuffer));
94-
char schemaBuffer[65536];
95-
MemoryPoolAllocator<> schemaAllocator(schemaBuffer, sizeof(schemaBuffer));
9692

9793
for (size_t i = 0; i < ARRAY_SIZE(filenames); i++) {
9894
char filename[FILENAME_MAX];
@@ -116,7 +112,7 @@ class Schema : public PerfTest {
116112
continue;
117113

118114
TestSuite* ts = new TestSuite;
119-
ts->schema = new SchemaDocumentType((*schemaItr)["schema"], 0, 0, 0, &schemaAllocator);
115+
ts->schema = new SchemaDocument((*schemaItr)["schema"]);
120116

121117
const Value& tests = (*schemaItr)["tests"];
122118
for (Value::ConstValueIterator testItr = tests.Begin(); testItr != tests.End(); ++testItr) {
@@ -191,7 +187,7 @@ class Schema : public PerfTest {
191187
for (DocumentList::iterator itr = tests.begin(); itr != tests.end(); ++itr)
192188
delete *itr;
193189
}
194-
SchemaDocumentType* schema;
190+
SchemaDocument* schema;
195191
DocumentList tests;
196192
};
197193

@@ -203,14 +199,13 @@ TEST_F(Schema, TestSuite) {
203199
char validatorBuffer[65536];
204200
MemoryPoolAllocator<> validatorAllocator(validatorBuffer, sizeof(validatorBuffer));
205201

206-
// DCOLES - Reduce number by a factor of 100 to make it more reasonable and inline with other test counts
207-
const int trialCount = 1000;
202+
const int trialCount = 100000;
208203
int testCount = 0;
209204
clock_t start = clock();
210205
for (int i = 0; i < trialCount; i++) {
211206
for (TestSuiteList::const_iterator itr = testSuites.begin(); itr != testSuites.end(); ++itr) {
212207
const TestSuite& ts = **itr;
213-
GenericSchemaValidator<SchemaDocumentType, BaseReaderHandler<UTF8<> >, MemoryPoolAllocator<> > validator(*ts.schema, &validatorAllocator);
208+
GenericSchemaValidator<SchemaDocument, BaseReaderHandler<UTF8<> >, MemoryPoolAllocator<> > validator(*ts.schema, &validatorAllocator);
214209
for (DocumentList::const_iterator testItr = ts.tests.begin(); testItr != ts.tests.end(); ++testItr) {
215210
validator.Reset();
216211
(*testItr)->Accept(validator);

0 commit comments

Comments
 (0)