mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
22 lines
561 B
JavaScript
22 lines
561 B
JavaScript
// this tests 1% of all points using $near and $nearSphere
|
|
load("jstests/libs/geo_near_random.js");
|
|
|
|
var test = new GeoNearRandomTest("geo_near_random2");
|
|
|
|
test.insertPts(5000);
|
|
|
|
opts = {sphere:0, nToTest:test.nPts*0.01};
|
|
test.testPt([0,0], opts);
|
|
test.testPt(test.mkPt(), opts);
|
|
test.testPt(test.mkPt(), opts);
|
|
test.testPt(test.mkPt(), opts);
|
|
test.testPt(test.mkPt(), opts);
|
|
|
|
opts.sphere = 1
|
|
test.testPt([0,0], opts);
|
|
test.testPt(test.mkPt(0.8), opts);
|
|
test.testPt(test.mkPt(0.8), opts);
|
|
test.testPt(test.mkPt(0.8), opts);
|
|
test.testPt(test.mkPt(0.8), opts);
|
|
|