diff options
Diffstat (limited to 'jstests/noPassthrough/global_operation_latency_histogram.js')
-rw-r--r-- | jstests/noPassthrough/global_operation_latency_histogram.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/jstests/noPassthrough/global_operation_latency_histogram.js b/jstests/noPassthrough/global_operation_latency_histogram.js index 3e5b4bcd8c8..d6ed2cc3c6e 100644 --- a/jstests/noPassthrough/global_operation_latency_histogram.js +++ b/jstests/noPassthrough/global_operation_latency_histogram.js @@ -102,11 +102,17 @@ assert.commandWorked(testColl.createIndex({pt: "2dsphere"})); lastHistogram = checkHistogramDiff(0, 0, 1); - // GeoNear + // $geoNear aggregation stage assert.commandWorked(testDB.runCommand({ - geoNear: testColl.getName(), - near: {type: "Point", coordinates: [0, 0]}, - spherical: true + aggregate: testColl.getName(), + pipeline: [{ + $geoNear: { + near: {type: "Point", coordinates: [0, 0]}, + spherical: true, + distanceField: "dist", + } + }], + cursor: {}, })); lastHistogram = checkHistogramDiff(1, 0, 0); |