Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
b2e2857
commit 76f4b7d
Showing
2 changed files
with
29 additions
and
6 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,26 @@ | ||
|
||
# | ||
# Stress test to check for memory leaks (#24) | ||
# | ||
|
||
using Mongoc | ||
|
||
client = Mongoc.Client() # default locahost:27017 | ||
db = client["testDB"] | ||
collection=db["testCollection"] | ||
|
||
document = Mongoc.BSON() | ||
document["name"] = "Felipe" | ||
document["age"] = 35 | ||
document["preferences"] = [ "Music", "Computer", "Photography" ] | ||
|
||
# generate some entries | ||
for i in 1:100000 | ||
push!(collection, document) | ||
end | ||
|
||
# read bson documents from collection | ||
for i in 1:10000 | ||
for entry in collection | ||
end | ||
end |
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