-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PHPLIB-1234 Implement BSON micro-benchmarks (#1171)
- Loading branch information
Showing
5 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
|
||
namespace MongoDB\Benchmark\DriverBench; | ||
|
||
use Generator; | ||
use MongoDB\Benchmark\Fixtures\Data; | ||
use MongoDB\BSON\Document; | ||
use PhpBench\Attributes\ParamProviders; | ||
|
||
use function file_get_contents; | ||
|
||
/** | ||
* BSON micro-benchmarks | ||
* | ||
* @see https://github.com/mongodb/specifications/blob/e09b41df206f9efaa36ba4c332c47d04ddb7d6d1/source/benchmarking/benchmarking.rst#bson-micro-benchmarks | ||
*/ | ||
final class BSONMicroBench | ||
{ | ||
#[ParamProviders('provideParams')] | ||
public function benchEncoding(array $params): void | ||
{ | ||
$document = $params['document']; | ||
for ($i = 0; $i < 10_000; $i++) { | ||
$document->__toString(); | ||
} | ||
} | ||
|
||
#[ParamProviders('provideParams')] | ||
public function benchDecoding(array $params): void | ||
{ | ||
$document = $params['document']; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
for ($i = 0; $i < 10_000; $i++) { | ||
Document::fromBSON($document); | ||
} | ||
} | ||
|
||
public static function provideParams(): Generator | ||
{ | ||
$cases = [ | ||
'flat' => Data::FLAT_BSON_PATH, | ||
'deep' => Data::DEEP_BSON_PATH, | ||
'full' => Data::FULL_BSON_PATH, | ||
]; | ||
|
||
foreach ($cases as $name => $path) { | ||
yield $name => [ | ||
'document' => $document = Document::fromJSON(file_get_contents($path)), | ||
'bson' => (string) $document, | ||
]; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"right": {"right": {"right": {"right": {"right": {"right": "EIXQykWD", "left": "VRVcZnIk"}, "left": {"right": "oRbShlgw", "left": "ojDbdtPA"}}, "left": {"right": {"right": "CzHfouDM", "left": "GQXwTsrM"}, "left": {"right": "JEQOwZLQ", "left": "LgWNfbhn"}}}, "left": {"right": {"right": {"right": "khozCROb", "left": "rTMhLQtj"}, "left": {"right": "iJBmstFH", "left": "LvtNlLgv"}}, "left": {"right": {"right": "UYcmaFMh", "left": "tuanWIAx"}, "left": {"right": "WwptcESl", "left": "ixOtlORA"}}}}, "left": {"right": {"right": {"right": {"right": "dicfQcdX", "left": "xYMiAHwv"}, "left": {"right": "WbMXdChI", "left": "oWLWuHVi"}}, "left": {"right": {"right": "wRodFaZo", "left": "aTcaLCnp"}, "left": {"right": "ijcnduCw", "left": "KFbXjDfX"}}}, "left": {"right": {"right": {"right": "zzEcxhSZ", "left": "bWSAvFzm"}, "left": {"right": "mQjffcog", "left": "hDbObPsH"}}, "left": {"right": {"right": "LOxUOaEy", "left": "DzfmhHAL"}, "left": {"right": "oGVrSHkQ", "left": "GGTRCnke"}}}}}, "left": {"right": {"right": {"right": {"right": {"right": "PHHXnUgq", "left": "xkZzQsMR"}, "left": {"right": "bSpBOtXU", "left": "lmRMwRFf"}}, "left": {"right": {"right": "ReWinBoZ", "left": "TOlxDiMX"}, "left": {"right": "KuopgxIC", "left": "iWKMSGCV"}}}, "left": {"right": {"right": {"right": "pydwIHaq", "left": "KMJNfqEW"}, "left": {"right": "JtXAjgEq", "left": "YmMYBRkX"}}, "left": {"right": {"right": "wmdxiSSk", "left": "sABNQDEX"}, "left": {"right": "YnINlnHU", "left": "qMdmLtPq"}}}}, "left": {"right": {"right": {"right": {"right": "rHcvRSjR", "left": "uNIIxBLx"}, "left": {"right": "atKAMwgJ", "left": "XWFVhrTV"}}, "left": {"right": {"right": "HIQHjrLx", "left": "YughZJOY"}, "left": {"right": "qYeyvcvK", "left": "mzHqtLHA"}}}, "left": {"right": {"right": {"right": "BlifVvAC", "left": "BvZTPsYB"}, "left": {"right": "XPHqYTOu", "left": "qUNMEFgS"}}, "left": {"right": {"right": "zkxbAuKr", "left": "YpAkENEL"}, "left": {"right": "wuBwgsDI", "left": "ONIZsGFD"}}}}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"pfZSRHnn":{"$numberDouble":"4837384839313709000"},"XeRkAyCq":{"$numberInt":"12"},"oRWMNJTE":"pbJrsZrkbKNGqDNwPPrxpeWVBRWgREWtfaZZCrLkBUmdAXdyaPcrMwhDzBXCpZtXjloYMgNgfIfEyrvq","hnVgYIQi":"RwMsHQcqgXvkmNpPIndeDusPOwRfluOOvXnTxwpiZvzkMWQaEQXjyfjoSMcqpeGmULGQlhWvHxmxFNqe","cxOHMeDJ":"RTMMHBNebriQZeGrExTKSJsMRbeKcIzaEqpMwOlVfgNreVIHDkLFBjDWJMubctZtjlozdPqZWyhillEw","MeUYSkPS":"sunCadRBarhKilkQEMRPVYQULkReALfyzmotkXUeDMcEiRvxgqyBiTQhmuoFXQxMotjJFjYTMrEyZFEM","IsorvnMR":true,"vvUeXASH":true,"zEgGhhZf":false,"SUWXijHT":{"$numberInt":"13"},"HicJbMpj":true,"ijwXMKqI":{"$numberInt":"30"},"RemSsnnR":false,"McpOBmaR":"fKGDZnXeXYTKnMITrDZrwVjNojiGCkNHtnWSxYwAiOtmIaVzDzQfifoorkYKjESnrauTyfClKjyczlPG","ddVenEkK":{"$numberInt":"41"},"CqCssWxW":"iXTkPsEpuEDVFxDIJsZVLuzUHCNfIiCQXYFjFBNHabJBENLnGhIsjUaLMWUaUqUiUiHRcPycHhHfrNdm","taoNnQYY":{"$numberDouble":"6412916066386615000"},"MXMxLVBk":{"$numberInt":"-83"},"yeTUgNrU":false,"vkEDWgmN":"HMobufHXBFQvVXzYiYqKpWMTqviPqPJtGEEVsebUiwVSbvYExShHJSVrwBEcovhlVhhAJKERrsmaipwn","TgSwBbgp":{"$numberDouble":"1912191031177068500"},"FDYGeSiR":{"$numberLong":"487277598556628711"},"xrzGnsEK":"UgqXkyWUceZzifQuDdMLiOtOwnPoolsdcjfsWkbQfWfOzgPpXEbefKjgRCxjCLgDRqpHypvyclTHDoxD","VVvwKVRG":{"$numberInt":"-81"},"TmUnYUrv":{"$numberLong":"7726451032369080086"},"OCsIhHxq":"VxBUZZSjnrXwRplwxRSJGwkFBFVpGvLFpWTFrmSJNJcgQQUFmlEYUcFnXOdJrOFQCaIlmBMzoihXdofI","pKjOghFa":true,"VCSKFCoE":{"$numberLong":"434237187180930726"},"yKfZnGKG":{"$numberDouble":"6813471041107657000"},"UKwbAKGw":{"$numberInt":"-32"},"iFFGfTXc":"hfiYFaVdPKSVRQlUccqrBdSxbXlRNDDaUCQsFmuXkUSJLPshjiFbjnmWlfVsiXXflAioxjJUFQhBWxTk","RwAVVKHM":"mgrXmDmkEyXOcafRFdcgQWPnDJERlFruGXatARowzYEoXCjeGzUmNFqnFAOxlTPRIuAEEEIFluDgqPHz","AtWNZJXa":{"$numberLong":"3508212275855267880"},"XxvXmHiQ":{"$numberDouble":"7674526623550603000"},"wmDLUkXt":{"$numberLong":"6862757006749435415"},"zSYvADVf":{"$numberLong":"4604914032121925983"},"VcCSqSmp":true,"jmglLvAS":"VRgSVSHCZypXPQVtNMQhBVncwgFlzwuDUGqtlEiPZekhblDroihrDBKGomJreRVvxEsbEntNMXMZWogD","ZmtEJFSO":"OSFQgOFQgWjYqkdWfrCsigaqKtrlvhMXRPzZkIMUoNQTyzksczZAxCUpugucyVtOsAnCZOXPWOsRrxiK","MqfkBZJF":{"$numberInt":"-74"},"doshbrpF":{"$numberLong":"6122240408803684263"},"jWaFvVAz":{"$numberDouble":"4715021990214510000"},"LVNIFCYm":false,"VplFgewF":{"$numberInt":"34"},"eRTIdIJR":"XbGmdGmGWEGFksccUGkSQDfTCpsgwkFncUsKPMGDoAnqsYcOmKhhFpNEbCcoGxcRvgMLXPXPtGyWTizz","zswQbWEI":{"$numberLong":"6244091767194659669"},"obcwwqWZ":{"$numberDouble":"1896750106775623700"},"vlSZaxCV":"OtIbYgSoPwVCZLkuJTaYGycvxNQLQISxykLwSPAfuqutkkOsBaIfZkCWBrFphwtREOcbguXIfyfolWFC","QobifTeZ":"DYnMUSYAFqdovehITtzUczCWFCsGIZohIDsXlcwXRUWRBdsbUZUhbYmRhQlNMOWpIaXBehDXJFbGcdOM","XXKbyIXG":{"$numberLong":"2072366708468029955"},"dNSuxlSU":"QnxFGQAgRGNTNDoexinDfHbjtzzBgHOuDgdjrtzGEIaqPsgyNrmiWYyKAUyXVYQGLkKEQDhYDwgrIFDQ","HrUPbFHD":{"$numberDouble":"325761556852724740"},"XEBqaXkB":{"$numberDouble":"4019504911325976600"},"xWpeGNjl":{"$numberLong":"7449003994039447076"},"aicoMxZq":false,"LngvlnTV":{"$numberDouble":"1970843135463072800"},"WYJdGJLu":"phaJTVYjUODRlTcpQmsfpOmPvbCeGxLvJiAUQFUMHoYxPzvbLxTyqvmXtRDHjZtYmGzxihwoWDhVoeZY","TRpgnInA":false,"JhImQOkw":true,"KMKBtlov":{"$numberLong":"860986396812465750"},"gySFZeAE":{"$numberDouble":"3015363760891914000"},"RPsQhgRD":"lMIstKuqhARucceUyKpUkdSXwIAOeOhfJJyJaifJYnQRHWauhGovMmgwCqkKwphGEQnHishVfNZprBJl","rmzUAgmk":"srpWYNgASRjyQzUTVMpyTqQdAwGrIduuOzolvbmKNcNRDksZAoJKKDwhyqSSkGvSmpMOgaeslHWzaoce","Ibrdrtgg":"RqbUIwdCfDmzWikDAgKfWuQfilTKSeEyPIxyBaIqZzjbTTxSPkbLbstWFhGcWSnAumROlwADbnmUCRjN","WmMOvgFc":false,"KnhgtAOJ":"IyuKFgZwvnAGBNCoemNXfwQjMfUlvWOYyuwmSOWMNxxVSgraCIKQPiRNuAiOkuErAHgDwIHEOhSxPWlf","qrJASGzU":false,"egxZaSsw":false,"cVjWCrlu":{"$numberLong":"2748531972151590948"},"OfTmCvDx":"IoaWOFbeGbFAgmTDdgRVQZBocrhtcEbUkPuIGpRpewYLHwhzcWtAVcqmgQcxcjTUjNUQLYqDyzdGWIOv","MNuWZMLP":true,"JrJzKiIx":"GkDzDJPJFYxRGoyzkQNPIpNPkwIXdaWQhIyTpYROuBxIZUZsImnCWfNmoTgYOuYODuxAeOqrKNVMgoTV","JzgaUWVG":{"$numberDouble":"5703784872945009000"},"WHSQVLKG":true,"SYtZkQbC":"atHWUNSMsYTkOhIVdOXfTfunoQQIuRWzdxPQDOIOagxKUOewsHOWHPZWnvtIWGtJYkbkYclyPGHjhjqo","nBKWWUWk":{"$numberInt":"41"},"Rbxpznea":{"$numberInt":"34"},"tIJEYSYM":"jGphtvhjtsZDtmacwidBiDdGLohKmbCYHanoFpxyqhIDaUGhxLdZwjyXSxmXClUycMWCNBVmCHNQFPjI","dHsYhRbV":"MpSSMTdVdDdUljTFtgNEQLzCUWneoIDMyZzOvlAczEdVhFNPokYsjnKPwTjcSPBJhoqZEiyElvTKoBZK","iwfbMdcv":{"$numberDouble":"8139611435673170000"},"dCLfYqqM":{"$numberInt":"23"},"ahFCBmqT":{"$numberLong":"7114997365939674931"},"TkXMwZlU":{"$numberLong":"3854513878611629146"},"LUPqMOHS":"SKNaboMrDhvPGbymhONwDrWPbhIgKmFmIAqaNTiSEHGxqCdyWPXClLhOmIxzJXyJwpduAvdCrebmyWVv","hwHOTmmW":{"$numberDouble":"5160167887703515000"},"kfvcFmKw":false,"bkuaZWRT":{"$numberLong":"977724985626757127"},"nKhiSITP":{"$numberInt":"59"},"CYhSCkWB":"uQZqBkRYVaYFubIssZEPDMoJwZNUXoHWdutFeuwnbzwlwskOxqJEhulXzctrrhuXAduwqpxYRXVzvEyF","vSLTtfDF":"XgPsrVgaBzFFzulnuoYLRQDLjFOfsOCbAHiajSHeGSYdMbxlWWIFaPxOsnNqYbLRLVEeWOCEKFYIlupp","CEtYKsdd":"ULtshGrugvoWEbLeIuwpnMjYAQfxthdAAMbXQLNKlkqTZlrczjoKrdFFTVWVsFiNsPLfrAOOMrjBKUpt","dVkWIafN":{"$numberDouble":"6092406401066639000"},"HQiykral":{"$numberDouble":"6997084378132750000"},"YDHWnEXV":"glMkrFRyjzyKXLrYKXVuCzbjygQgzGfPnZaGrYPJZJczkDtRKyQFiIxIMVFpfiegBAgWylCPKUnXHNyt","pacTBmxE":{"$numberDouble":"5976360937339736000"},"ddPdLgGg":{"$numberInt":"-11"},"xWUlYggc":"AUOduJdhWBfjzZAjbtISwIbBJDekDcGkFKpkuPuSEKvyJovAOsbnBUSkgJPCozLVFtqKWlcbkbLMDAUe","dpbwfSRb":"LYdHhOzEWLioOBePsqKpSTanmJsqGmJGmBhAGmgaUZWOUfppmzGbzBjYBnyqNhAszSAyKVIFspeBvvFF","AgYYbYPr":{"$numberInt":"72"},"wjfyueDC":true,"fEheUtop":"QXACxLaREdGLHJLPLMfCEwHgEDoMiwbTBWMsKXsPgtAQGUVHNnshCipscgmQDEFeCZijffBNQYBDflvF","pOMEwSod":{"$numberInt":"-96"},"BwTXiovJ":{"$numberInt":"-23"},"TDUzNJiH":"RZZTBkdVIIydZfwHaVrFJGsIUMIObjlUHiyCIZFbjRHrhgyCIXJQNROinoekjzrStNhmVONXpFTuhZCu","KyxOoCqS":{"$numberInt":"-81"},"zMCFzcWY":"cptNXXHxnUyOVkDCHgaFBvzTrXkyngxRpUhorRpZTwetLlbemqxvYDaIkzPVPdQhLsyokFFrsCpsIcQF","FpduyhQP":true,"JXMyYkfb":{"$numberDouble":"3513302241369264000"},"yXSBbPeT":"lYVEceJTwIsxYgeHfyhPyUHilJBbFbYbbmptwtzKvXhITbtiicRyRyaxtaLmXqeHTgDsIHHNCZsDewWM","wjAWaOog":"oVhUaqzlBGrSveZHuRAGDENonbZFPQWWcCMQVnIOnBTBsYfetnRUfIkgqrMTQaCtVRMHFeLvjyoeAojc","cepcgozk":"HWWMoqFPswvQGTohBvAOnpfsjOgPmvuWfVODrpySXWabfjLQcAJfScmKBZeQgGNDhhHIQcWDYlFdTPOu","DQBQcQFj":{"$numberLong":"8199992792049175759"},"sYtnozSc":{"$numberLong":"7484353617351081136"},"BBqZInWV":"AzsVuMwTaJDIRJPdOoCtSchUgUSwaCIiDpsXVpbGxxHeYpNsCSKtiHJlWAAVFlFEAhVpJeWXpiRXlhhd","dtywOLeD":"LyYVrOxlWLyBfldYXiwvEKzkDxnxVoeKGZrvDybrJkuEyUAfmaxIjLENDWMyZlDrsWFEOGrriEtDQCLg","WoFGfdvb":"QKphEuwokwrAKuiBoyUQaMRRYHETLBbVIvIjYudcCiFwwwngoDmjqGuHAnQGFNuPPmzNKsuRcpMkKDYR","zDzSGNnW":true,"ReOZakjB":{"$numberDouble":"66287689751350270"},"uMDWqLMf":"ThdZGzzcvZOfAAZuYxcxhmbyOELCwOWjzaRPMIfkxsEtmQKHLAnBNgNouVFzcmMnxSqWKvHftNUdFGry","GiAHzFII":{"$numberInt":"69"},"UtbwOKLt":{"$numberLong":"2280370138792319183"},"DJsnHZIC":{"$numberInt":"-40"},"SqNvlUZF":{"$numberLong":"5994784905659127787"},"PvfnpsMV":{"$numberInt":"-65"},"UpdMADoN":true,"jbUymqiB":"RstgOATQyfadznEncFuQxWiXZDnBlNSVTnZyyDukKwUtfwFAIslMLeZMReWmOupCOShgfpsLjvdQsTrH","qHzOMXeT":{"$numberInt":"-56"},"XGxlHrXf":true,"sGWJTAcT":false,"VtzeOlCT":"YCXdGpHeDrPjQllqOZbXdGDzIjFCDBIbqUwoVAUkcdfuPvMLsgYFJCQfDVHxxIbToFRJANYYfZGCOpni","mlfZVfVT":{"$numberDouble":"1362707589677182000"},"HVHyetUM":{"$numberLong":"2679099034338649685"},"gErhgZTh":"hbAkaEVuyVtmEMjRmvnKugRdszFExBLKpFeSczaRQBvqAWLqBNKRPisGtlCbgtbcpFMrvIkQwycqzQGj","omnwvBbA":{"$numberInt":"-44"},"AgSNVyBb":{"$numberLong":"5022992695992337622"},"CDIGOuIZ":{"$numberDouble":"4277641814126091300"},"CFujXoob":{"$numberInt":"-92"},"reiKnuza":{"$numberLong":"6584276617939036140"},"PjKiuWnQ":{"$numberDouble":"5348924571675368000"},"pQyCJaEd":{"$numberDouble":"4291392859207246000"},"xZOksssj":{"$numberLong":"6571311739487813793"},"AMQrGQmu":{"$numberLong":"8087840999310375327"},"HQeCoswW":{"$numberDouble":"6409675101451264000"},"pPtPsgRl":"XVgpEfMdrVZdLjSeJbYCLQaXfYDqkGpjUrEwVLNyRvDLIxonippcArEpnTMdooUauoGmguuGNhxisdFq","_id":{"$oid":"568176370279243c4c57a495"}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"KpnXZaDQ":{"$numberInt":"94"},"BOQAeydE":{"$binary":{"base64":"RWNVVkhUUmVsWEhzcnhxV25WdnVQTWFERUJMRFRrYmlOVUFGYmh3QWZzRGtTRkVHT1lrTWFKR2twUUFIZVVGWkJ1Y1RlYlpNTGF2VG51Vk8=","subType":"00"}},"kVDldkCH":{"$numberLong":"7791511468172299508"},"olUSRZtj":{},"ayrwiTMT":{"$maxKey":1},"nyYyaFrV":{"$numberInt":"8"},"zlVZQePF":true,"iRVlyXVm":{"$numberLong":"2167305701202279400"},"lyWwkZGg":{"$code":"ynoqoVfRjpUAZooFnnxIjIwFuYZtGrYKmntfyvBQOPsLMGcJGsaFeTvcTweCJIGGtFnFOnYfezldSuSy","$scope":{}},"DfzEYsYW":false,"VFKRjaPW":{"$minKey":1},"pDeYcUIu":{"$date":{"$numberLong":"776822400000"}},"kqKTGXUm":{"$binary":{"base64":"c2VhUHJCUEZwZ3lSekhDVWhMQ1VSdExiTENReGx4SnBzaXhPanlreFluWnhjQXhGYWlFS0xhaFJZVGZhaktVdnREeUFxZ2hIZlpDZWpoTk0=","subType":"00"}},"iNbJUZuj":{"$code":"QEUjFSxUAHTQGjJRGuawHllxxbITZGkBplrnbHyjiXVhZEnFmauehFkYOaIaYPbtyAsBMdRyonmwrflg","$scope":{"fKyfBXJY":{"$numberInt":"-39"},"UflrpcEy":{"$numberInt":"-99"},"MFzjzCYI":{"$numberInt":"-72"},"eTohHXcM":{"$numberInt":"56"},"LcgVuFFV":{"$numberInt":"-68"}}},"buEAkIge":{"$date":{"$numberLong":"1449360000000"}},"NAKOhrML":{"$numberInt":"-30"},"CAWdqfmI":{"$numberLong":"5403474030514800337"},"hAcOFtfN":{"$binary":{"base64":"Y1RHZ01abE9oaXd2ZFJSZUxLaFliS2t6Q2xsVFNucHBXb1hTSFZSSVJOSUd6amtSTlNmb05jRnZrWWxoQ2pVa0lDWVZ6ZWh5ZmZqTFNXYlc=","subType":"00"}},"qPDeTZWq":{"$numberLong":"9055278099777449039"},"ARdpUnvr":{"$code":"UubGxpjznChawiBpCJjWgjYaHAjdqHFbOBQyDkpBtMMtyZEIetHzpZshLLNChAQObxpMHdqsLkNoyFtl","$scope":{"oGlfmjDq":{"$numberInt":"79"},"SJqmyxSJ":{"$numberInt":"90"},"KGCCxetX":{"$numberInt":"-84"},"OMDIwkuc":{"$numberInt":"-81"},"mJtyLYxY":{"$numberInt":"66"},"mYPcOozX":{"$numberInt":"44"},"dsIvQCvi":{"$numberInt":"52"}}},"geaenijV":{"$timestamp":{"t":1,"i":1027123200}},"EuKkhmHw":{"$minKey":1},"kcVXzXHn":{"$code":"rcFbGNwyjskyGgevDrFrsDOstYxGvADYxnEuRepZGlnGUHtyPBoDsvyEHQzfwNLCSiaElUWgQmBRUWyE","$scope":{}},"dSMWIFLD":{"$numberLong":"7306035949033000157"},"UuDsAOGk":{"$code":"umFRKcVcQPMdvBGLMEhgNIiDjlxBzzeqlGJeJHhTUPCDeCxnnCMGkxbKnSxstvURPRlRoGMYMejQNULY","$scope":{}},"KUVCyPFv":"oQqKPHpzjHknSfdFdEymIJOZxYOQotZKAFlanBTLUBUFCPCpgXEdqXoNVVReXxJkzCpwLQqNVKvPGJJW","kFaSNVoS":{"$maxKey":1},"SQIAGqNE":{"$numberInt":"-58"},"MsFvjFIM":{"$code":"jYbFSnAjtwHgLOKGmENJthmsPIKxbQIulkOVicMfFRnxmkIkIPOcZyPyhMFrweORAcDwwJpWuSwxYqFv","$scope":{}},"ZZbaMgQp":{"$regularExpression":{"pattern":"uWxyRVYi","options":""}},"GqcHZeLf":{"$numberLong":"8240785954293476870"},"xCNVQDhK":{"$timestamp":{"t":1,"i":1438819200}},"jMeFYftg":{"$numberLong":"455743854322593800"},"yltfrVvf":{"$code":"WWoPrkbAWYFjTUsIgIpaCkPcymjMGotwFvITafFXXzvrAYSoGcfDkdlIIGYKqejFJwPJElNrShMdgJOZ","$scope":{"TKLtwaMQ":{"$numberInt":"-41"},"GniljOvp":{"$numberInt":"-74"},"PMKRGIPz":{"$numberInt":"-98"}}},"NzsNfcyY":[{"$numberInt":"5"},{"$numberInt":"2"},{"$numberInt":"5"},{"$numberInt":"10"},{"$numberInt":"6"},{"$numberInt":"8"},{"$numberInt":"3"}],"hhVNsfZZ":{},"OagyDZLm":true,"VIJGlGfX":[{"$numberInt":"8"},{"$numberInt":"2"},{"$numberInt":"9"},{"$numberInt":"8"}],"RBrgnptQ":true,"ebfJeJwS":"RCFBSqorwgFNcBwCWsgxjnSvWQQTUeUcTiDliSmuEldTlhzBFuLyysIKwaiSwZCdCnqRyiRfFNnKXVXE","LQygaTou":{"$code":"pVShLZkivMkARMdSFjHSaBcZPreJuYBsSpxIzQSVteWGQSXfFesEmCYzZyHhjpSLuuBEcEefRdyphvWw","$scope":{"Pnilqgzk":{"$numberInt":"43"}}},"uNvbuffj":{"$date":{"$numberLong":"1229817600000"}},"SHvLWKjg":{"$binary":{"base64":"SE51VlZGWXdBYkpqaVhIRlBJR3hDd2JUb2plVnBrQWZIZUN1U2Rab2ZudVZPZmpKR01QaFpxTUdPWHdiRnpibGx1c0ZnY0NscFpZRmdqb0Q=","subType":"00"}},"wKCwNLSh":{"$minKey":1},"giVmVwzU":{"$code":"JSgaICRscEgxNZjwPeEocTpfhdMNhAqbmOzwtuRMdhyTxwAKwLdplIJjWXzZYxIeLlofqqQPfTxJmoZX","$scope":{}},"BGAqpNkE":{"$minKey":1},"ZmCYgzpS":{"$timestamp":{"t":923788800,"i":1}},"PGiZAWYN":{"$date":{"$numberLong":"1270339200000"}},"wShiBppY":true,"tuTaYuPG":"aLfBnCaptjatvIvMUHkijCexLohaUYmmugMsQpyedSBfAFgvSktBNYTGBmmLUIUGsmhQCCSerSEHRMpZ","mUXXRWFX":false,"xoLWHvAD":{"$code":"VcWVKVTUfFgthzjgmctPeijKmNDrlOWddmBcMGulYjhiWyRpBjlUjJjTBXCbWAyYNZUGiqSlMjrZShPZ","$scope":{}},"WqNFzMgH":false,"JQbxXYUE":"NtsOrOgfmcvAXehXybWnzADxfildzokfBvdPWmvEShmKsNGuZkZmdUbuUmGLWuRwvkIksIGAVJtHeWaK","AZbAtRCC":{"$code":"AUKJNhEvuziRiApNRrScrKlADiLovaxVLOxyGodLKWuQJRwMMwOnqLwTLVDglnKBYOLyOvoYyRwEJCKH","$scope":{"IJpzzYpT":{"$numberInt":"52"},"CtVYmtxF":{"$numberInt":"-75"},"ELcEqqir":{"$numberInt":"-83"},"zMJPPwpk":{"$numberInt":"-30"}}},"JlhVrQmD":"TdJBbKVLawqzBqmqzuRpVVetrdgAbyHNMCGWuCKMUPJJQxDVpBuBjLhkRjilTxYmdkYNkflsBRdCBGHp","vSvdWAnJ":{"$binary":{"base64":"R1BaektHUlhZZ3J4S1BYUWVFTGd4Y2lkQVNNblRzeHNObmJ4Rm1hbExVRUNGd2NydVR6VVJCelpNdllIRHhUUk1NVEhWd21wZndOcHZza0w=","subType":"00"}},"JEVgGziE":{"$numberLong":"2044627925402213400"},"LCHLPrcd":{"$maxKey":1},"fWBoraHq":{"$timestamp":{"t":1,"i":984268800}},"bxrxTsho":[{"$numberInt":"8"},{"$numberInt":"10"},{"$numberInt":"10"},{"$numberInt":"2"},{"$numberInt":"9"},{"$numberInt":"5"},{"$numberInt":"2"},{"$numberInt":"1"},{"$numberInt":"7"},{"$numberInt":"7"}],"uhmyCSEv":{"$maxKey":1},"rclBQefx":{"$numberLong":"5827556087171336561"},"iEoENLRz":{},"yPKwWWxb":false,"fvLXcTQB":false,"DQuSYbZR":{"$binary":{"base64":"anhGWHB5d05uT0JLbmhEc05ncWdNaVJMTVlCSmJSbXZ0a3RWZnh1cnZLY2JaS3NjQlB2RHV6WVhFQnJ3eWZ0eEpIdGF0eXduYUtJbWlhc3U=","subType":"00"}},"uSbYKmdX":{"$maxKey":1},"nLsRKLJQ":"HPzjoSuhGkNSwsULyFwEIlRZlGEkxutczLMBOeeOvaWCAZRKZoTUFpcLNHQBGCVAskBBJGRvBLyRkRXn","kQhDjXIO":false,"duzmrLJI":{"$code":"tyYTwBCQgIUaLlAFjjJsrDdCczsyCJXvMDWdfnArhrEQnrBxxXpmBIxukADpKExQuXKpPSnBdWmEgXoV","$scope":{"EXKjeucO":{"$numberInt":"49"},"lsZZCuLP":{"$numberInt":"-43"},"giussUAr":{"$numberInt":"11"},"asWnYFAn":{"$numberInt":"-5"},"KsNFIwWL":{"$numberInt":"-94"},"avUNuoZK":{"$numberInt":"-68"},"ursJhljA":{"$numberInt":"-18"}}},"zqpnKCOL":{"$minKey":1},"SQOAGVaT":{"$date":{"$numberLong":"905817600000"}},"WboSdRaB":true,"bRaWfHwf":{"$numberInt":"-70"},"QdkSZoFx":{"$minKey":1},"EAYSerbF":{"$numberLong":"941789166999923700"},"IsYFQBkP":{"$maxKey":1},"BZogAEUM":{"$regularExpression":{"pattern":"luJBIsSO","options":""}},"duTaTKGF":{"$timestamp":{"t":1,"i":1252972800}},"IJOIvDcw":{"$date":{"$numberLong":"775958400000"}},"TtYjxGJH":{"$numberLong":"8268697854246446000"},"caPGDEGj":{},"dNVHpBIF":[{"$numberInt":"7"},{"$numberInt":"6"},{"$numberInt":"2"},{"$numberInt":"7"}],"hUhWCZbY":[{"$numberInt":"5"},{"$numberInt":"6"},{"$numberInt":"8"},{"$numberInt":"5"},{"$numberInt":"9"},{"$numberInt":"1"},{"$numberInt":"1"}],"hjSPiBiC":true,"UwZlNrHv":[{"$numberInt":"7"},{"$numberInt":"3"},{"$numberInt":"3"},{"$numberInt":"5"},{"$numberInt":"9"},{"$numberInt":"7"},{"$numberInt":"5"},{"$numberInt":"4"}],"juiYRtal":{"$numberLong":"6906562979624261000"},"RFhPJzgh":{"$numberInt":"-7"},"_id":{"$oid":"568176370279243c4c57a496"},"LNpbbRfA":{"$timestamp":{"t":808444800,"i":1}}} |
Oups, that should be
$document = $params['bson'];
. Otherwise Encoding is done by casting theMongoDB\BSON\Document
to string.