diff options
author | James Wahlin <james.wahlin@10gen.com> | 2016-12-19 14:02:02 -0500 |
---|---|---|
committer | James Wahlin <james.wahlin@10gen.com> | 2016-12-27 16:22:21 -0500 |
commit | ac7b0469bdb57a3593dc8b97e5a7045db0efbb24 (patch) | |
tree | c759fe0f6c4dff381ac08944f603851db6492c16 /jstests | |
parent | 72112a72ec3ee48cb883fc02b2904079d11f4954 (diff) | |
download | mongo-ac7b0469bdb57a3593dc8b97e5a7045db0efbb24.tar.gz |
SERVER-27175 Improve performance of planSummary string generation
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/core/profile_agg.js | 2 | ||||
-rw-r--r-- | jstests/core/profile_count.js | 2 | ||||
-rw-r--r-- | jstests/core/profile_delete.js | 2 | ||||
-rw-r--r-- | jstests/core/profile_distinct.js | 2 | ||||
-rw-r--r-- | jstests/core/profile_find.js | 2 | ||||
-rw-r--r-- | jstests/core/profile_getmore.js | 4 | ||||
-rw-r--r-- | jstests/core/profile_group.js | 4 | ||||
-rw-r--r-- | jstests/core/profile_mapreduce.js | 2 | ||||
-rw-r--r-- | jstests/core/profile_update.js | 4 |
9 files changed, 12 insertions, 12 deletions
diff --git a/jstests/core/profile_agg.js b/jstests/core/profile_agg.js index 209d0ce8b22..3422d171335 100644 --- a/jstests/core/profile_agg.js +++ b/jstests/core/profile_agg.js @@ -29,7 +29,7 @@ assert.eq(profileObj.nreturned, 8, tojson(profileObj)); assert.eq(profileObj.keysExamined, 8, tojson(profileObj)); assert.eq(profileObj.docsExamined, 8, tojson(profileObj)); - assert.eq(profileObj.planSummary, "IXSCAN { a: 1.0 }", tojson(profileObj)); + assert.eq(profileObj.planSummary, "IXSCAN { a: 1 }", tojson(profileObj)); assert.eq(profileObj.protocol, getProfilerProtocolStringForCommand(testDB.getMongo()), tojson(profileObj)); diff --git a/jstests/core/profile_count.js b/jstests/core/profile_count.js index 5e448201811..2fb9063a25b 100644 --- a/jstests/core/profile_count.js +++ b/jstests/core/profile_count.js @@ -68,7 +68,7 @@ assert.eq(profileObj.command.query, query, tojson(profileObj)); assert.eq(profileObj.keysExamined, 6, tojson(profileObj)); - assert.eq(profileObj.planSummary, "COUNT_SCAN { a: 1.0 }", tojson(profileObj)); + assert.eq(profileObj.planSummary, "COUNT_SCAN { a: 1 }", tojson(profileObj)); assert(profileObj.execStats.hasOwnProperty("stage"), tojson(profileObj)); assert.eq(profileObj.appName, "MongoDB Shell", tojson(profileObj)); diff --git a/jstests/core/profile_delete.js b/jstests/core/profile_delete.js index 937c6327e45..85f180fc18a 100644 --- a/jstests/core/profile_delete.js +++ b/jstests/core/profile_delete.js @@ -37,7 +37,7 @@ assert.eq(profileObj.keysExamined, 1, tojson(profileObj)); assert.eq(profileObj.docsExamined, 1, tojson(profileObj)); assert.eq(profileObj.keysDeleted, 2, tojson(profileObj)); - assert.eq(profileObj.planSummary, "IXSCAN { a: 1.0 }", tojson(profileObj)); + assert.eq(profileObj.planSummary, "IXSCAN { a: 1 }", tojson(profileObj)); assert(profileObj.execStats.hasOwnProperty("stage"), tojson(profileObj)); assert(profileObj.hasOwnProperty("millis"), tojson(profileObj)); assert(profileObj.hasOwnProperty("numYield"), tojson(profileObj)); diff --git a/jstests/core/profile_distinct.js b/jstests/core/profile_distinct.js index aea24f14333..432deffc542 100644 --- a/jstests/core/profile_distinct.js +++ b/jstests/core/profile_distinct.js @@ -29,7 +29,7 @@ assert.eq(profileObj.op, "command", tojson(profileObj)); assert.eq(profileObj.keysExamined, 5, tojson(profileObj)); assert.eq(profileObj.docsExamined, 5, tojson(profileObj)); - assert.eq(profileObj.planSummary, "IXSCAN { b: 1.0 }", tojson(profileObj)); + assert.eq(profileObj.planSummary, "IXSCAN { b: 1 }", tojson(profileObj)); assert(profileObj.execStats.hasOwnProperty("stage"), tojson(profileObj)); assert.eq(profileObj.protocol, getProfilerProtocolStringForCommand(conn), tojson(profileObj)); assert.eq(coll.getName(), profileObj.command.distinct, tojson(profileObj)); diff --git a/jstests/core/profile_find.js b/jstests/core/profile_find.js index ed7dc62638c..36116c5a6fa 100644 --- a/jstests/core/profile_find.js +++ b/jstests/core/profile_find.js @@ -35,7 +35,7 @@ assert.eq(profileObj.keysExamined, 1, tojson(profileObj)); assert.eq(profileObj.docsExamined, 1, tojson(profileObj)); assert.eq(profileObj.nreturned, 1, tojson(profileObj)); - assert.eq(profileObj.planSummary, "IXSCAN { a: 1.0 }", tojson(profileObj)); + assert.eq(profileObj.planSummary, "IXSCAN { a: 1 }", tojson(profileObj)); assert(profileObj.execStats.hasOwnProperty("stage"), tojson(profileObj)); assert.eq(profileObj.query.filter, {a: 1}, tojson(profileObj)); if (isLegacyReadMode) { diff --git a/jstests/core/profile_getmore.js b/jstests/core/profile_getmore.js index f9e606fa748..a9272567b1a 100644 --- a/jstests/core/profile_getmore.js +++ b/jstests/core/profile_getmore.js @@ -42,7 +42,7 @@ assert.eq(profileObj.originatingCommand.filter, {a: {$gt: 0}}); assert.eq(profileObj.originatingCommand.sort, {a: 1}); } - assert.eq(profileObj.planSummary, "IXSCAN { a: 1.0 }", tojson(profileObj)); + assert.eq(profileObj.planSummary, "IXSCAN { a: 1 }", tojson(profileObj)); assert(profileObj.execStats.hasOwnProperty("stage"), tojson(profileObj)); assert(profileObj.hasOwnProperty("responseLength"), tojson(profileObj)); assert(profileObj.hasOwnProperty("numYield"), tojson(profileObj)); @@ -117,7 +117,7 @@ } assert.eq(profileObj.cursorid, cursorId, tojson(profileObj)); assert.eq(profileObj.nreturned, 20, tojson(profileObj)); - assert.eq(profileObj.planSummary, "IXSCAN { a: 1.0 }", tojson(profileObj)); + assert.eq(profileObj.planSummary, "IXSCAN { a: 1 }", tojson(profileObj)); assert.eq(profileObj.cursorExhausted, true, tojson(profileObj)); assert.eq(profileObj.keysExamined, 20, tojson(profileObj)); assert.eq(profileObj.docsExamined, 20, tojson(profileObj)); diff --git a/jstests/core/profile_group.js b/jstests/core/profile_group.js index f1a2e3b48b3..cfcec3dfc1b 100644 --- a/jstests/core/profile_group.js +++ b/jstests/core/profile_group.js @@ -20,7 +20,7 @@ for (i = 0; i < 10; ++i) { assert.writeOK(coll.insert({a: i, b: i % 5})); } - assert.commandWorked(coll.createIndex({b: 1})); + assert.commandWorked(coll.createIndex({b: -1})); coll.group({ key: {a: 1, b: 1}, @@ -35,7 +35,7 @@ assert.eq(profileObj.op, "command", tojson(profileObj)); assert.eq(profileObj.keysExamined, 2, tojson(profileObj)); assert.eq(profileObj.docsExamined, 2, tojson(profileObj)); - assert.eq(profileObj.planSummary, "IXSCAN { b: 1.0 }", tojson(profileObj)); + assert.eq(profileObj.planSummary, "IXSCAN { b: -1 }", tojson(profileObj)); assert(profileObj.execStats.hasOwnProperty("stage"), tojson(profileObj)); assert.eq(profileObj.protocol, getProfilerProtocolStringForCommand(conn), tojson(profileObj)); assert.eq(profileObj.command.group.key, {a: 1, b: 1}, tojson(profileObj)); diff --git a/jstests/core/profile_mapreduce.js b/jstests/core/profile_mapreduce.js index 181e8684501..d579091aff7 100644 --- a/jstests/core/profile_mapreduce.js +++ b/jstests/core/profile_mapreduce.js @@ -40,7 +40,7 @@ assert.eq(profileObj.op, "command", tojson(profileObj)); assert.eq(profileObj.keysExamined, 3, tojson(profileObj)); assert.eq(profileObj.docsExamined, 3, tojson(profileObj)); - assert.eq(profileObj.planSummary, "IXSCAN { a: 1.0 }", tojson(profileObj)); + assert.eq(profileObj.planSummary, "IXSCAN { a: 1 }", tojson(profileObj)); assert(profileObj.execStats.hasOwnProperty("stage"), tojson(profileObj)); assert.eq(profileObj.protocol, getProfilerProtocolStringForCommand(conn), tojson(profileObj)); assert.eq(coll.getName(), profileObj.command.mapreduce, tojson(profileObj)); diff --git a/jstests/core/profile_update.js b/jstests/core/profile_update.js index 41727b89580..f4e04179a53 100644 --- a/jstests/core/profile_update.js +++ b/jstests/core/profile_update.js @@ -39,7 +39,7 @@ assert.eq(profileObj.keysDeleted, 1, tojson(profileObj)); assert.eq(profileObj.nMatched, 1, tojson(profileObj)); assert.eq(profileObj.nModified, 1, tojson(profileObj)); - assert.eq(profileObj.planSummary, "IXSCAN { a: 1.0 }", tojson(profileObj)); + assert.eq(profileObj.planSummary, "IXSCAN { a: 1 }", tojson(profileObj)); assert(profileObj.execStats.hasOwnProperty("stage"), tojson(profileObj)); assert(profileObj.hasOwnProperty("millis"), tojson(profileObj)); assert(profileObj.hasOwnProperty("numYield"), tojson(profileObj)); @@ -64,7 +64,7 @@ assert.eq(profileObj.keysDeleted, 5, tojson(profileObj)); assert.eq(profileObj.nMatched, 5, tojson(profileObj)); assert.eq(profileObj.nModified, 5, tojson(profileObj)); - assert.eq(profileObj.planSummary, "IXSCAN { a: 1.0 }", tojson(profileObj)); + assert.eq(profileObj.planSummary, "IXSCAN { a: 1 }", tojson(profileObj)); assert(profileObj.execStats.hasOwnProperty("stage"), tojson(profileObj)); assert.eq(profileObj.appName, "MongoDB Shell", tojson(profileObj)); |