Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start of #1350 #1707

Closed
wants to merge 6 commits into from
Closed

Start of #1350 #1707

wants to merge 6 commits into from

Conversation

refack
Copy link
Contributor

@refack refack commented Sep 23, 2013

Implemented an option to turn pluralization off

@refack
Copy link
Contributor Author

refack commented Sep 23, 2013

Start of #1350

@ebensing
Copy link
Contributor

Benchmarks for 23bdc2b:
insert

Insert - Mongoose - Basic x 400 ops/sec ±5.86% (77 runs sampled)
Insert - Driver - Basic x 565 ops/sec ±5.70% (83 runs sampled)
Insert - Mongoose - Embedded Docs x 101 ops/sec ±9.73% (52 runs sampled)
Insert - Driver - Embedded Docs x 502 ops/sec ±5.62% (86 runs sampled)

delete

Delete - Mongoose x 581 ops/sec ±2.71% (86 runs sampled)
Delete - Driver x 622 ops/sec ±0.67% (86 runs sampled)

update

Update - Mongoose - Basic x 523 ops/sec ±3.13% (86 runs sampled)
Update - Driver - Basic x 594 ops/sec ±0.94% (89 runs sampled)
Update - Mongoose - Embedded Docs x 92.89 ops/sec ±8.27% (54 runs sampled)
Update - Driver - Embdedded Docs x 444 ops/sec ±0.98% (88 runs sampled)
Update - Mongoose - Multiple Documents x 331 ops/sec ±6.33% (78 runs sampled)
Update - Driver - Multiple Documents x 499 ops/sec ±5.95% (86 runs sampled)
Update - Mongoose - pop and push x 31.67 ops/sec ±9.70% (56 runs sampled)
Update - Mongoose - Array Manipulation, parallel ops x 279 ops/sec ±5.53% (76 runs sampled)
Update - Mongoose - findOneAndModify x 273 ops/sec ±8.44% (64 runs sampled)
Update - Mongoose - find and update, separate ops x 276 ops/sec ±8.73% (65 runs sampled)

read

Read - Mongoose - Basic x 582 ops/sec ±1.82% (83 runs sampled)
Read - Driver - Basic x 674 ops/sec ±1.18% (85 runs sampled)
Read - Mongoose - With lean x 617 ops/sec ±0.89% (85 runs sampled)
Read - Mongoose - Multiple Items x 149 ops/sec ±7.41% (56 runs sampled)
Read - Driver - Multiple Items x 488 ops/sec ±2.03% (87 runs sampled)
Read - Mongoose - Non-index x 208 ops/sec ±5.43% (63 runs sampled)
Read - Driver - Non-index x 456 ops/sec ±0.75% (79 runs sampled)
Read - Mongoose - Embedded Docs x 302 ops/sec ±7.84% (68 runs sampled)
Read - Driver - Embedded Docs x 662 ops/sec ±1.38% (74 runs sampled)

casting

Casting - Embedded Docs - 0 Docs x 3,154 ops/sec ±8.88% (49 runs sampled)
Casting - Embedded Docs - 10 Docs x 3,107 ops/sec ±9.74% (47 runs sampled)
Casting - Embedded Docs - 100 Docs x 2,757 ops/sec ±9.11% (43 runs sampled)
Casting - Embedded Docs - 1000 Docs x 1,930 ops/sec ±11.06% (44 runs sampled)
Casting - Embedded Docs - 10000 Docs x 480 ops/sec ±11.75% (39 runs sampled)

population

Populate - 1 value x 397 ops/sec ±44.11% (86 runs sampled)
Populate - 10 values x 326 ops/sec ±7.16% (74 runs sampled)
Populate - 100 values x 60.13 ops/sec ±7.07% (51 runs sampled)
Populate - 1000 values x 10.92 ops/sec ±7.82% (37 runs sampled)
Populate - 10000 values x 3.07 ops/sec ±4.62% (20 runs sampled)
Populate - 5 properties x 12.38 ops/sec ±6.83% (42 runs sampled)
Populate - 10 properties x 9.56 ops/sec ±7.20% (47 runs sampled)

multiop

Multi-Op - Mongoose - Heavy Read, low write x 7.01 ops/sec ±6.02% (38 runs sampled)
Multi-Op - Driver - Heavy Read, low write x 13.01 ops/sec ±5.17% (43 runs sampled)
Multi-Op - Mongoose - Embedded Docs - Heavy Read, low write x 1.51 ops/sec ±13.89% (12 runs sampled)
Multi-Op - Driver - Embedded Docs - Heavy Read, low write x 10.40 ops/sec ±4.02% (52 runs sampled)
Multi-Op - Mongoose - Heavy Write, low read x 4.33 ops/sec ±7.01% (25 runs sampled)
Multi-Op - Driver - Heavy Write, low read x 8.54 ops/sec ±2.48% (44 runs sampled)
Multi-Op - Mongoose - Embedded Docs - Heavy Write, low read x 0.62 ops/sec ±3.89% (8 runs sampled)
Multi-Op - Driver - Embedded Docs - Heavy Write, low read x 5.36 ops/sec ±3.58% (30 runs sampled)
Multi-Op - Mongoose - Embedded Docs - Read-write-update x 1.38 ops/sec ±7.30% (11 runs sampled)
Multi-Op - Driver - Embedded Docs - Read-write-update x 8.47 ops/sec ±3.41% (43 runs sampled)

@ebensing
Copy link
Contributor

Benchmarks for 22c4d57:
insert

Insert - Mongoose - Basic x 384 ops/sec ±13.83% (77 runs sampled)
Insert - Driver - Basic x 592 ops/sec ±2.78% (84 runs sampled)
Insert - Mongoose - Embedded Docs x 100 ops/sec ±10.22% (55 runs sampled)
Insert - Driver - Embedded Docs x 509 ops/sec ±3.70% (85 runs sampled)

delete

Delete - Mongoose x 581 ops/sec ±1.74% (85 runs sampled)
Delete - Driver x 625 ops/sec ±0.76% (91 runs sampled)

update

Update - Mongoose - Basic x 488 ops/sec ±4.38% (83 runs sampled)
Update - Driver - Basic x 544 ops/sec ±3.66% (80 runs sampled)
Update - Mongoose - Embedded Docs x 79.33 ops/sec ±10.67% (49 runs sampled)
Update - Driver - Embdedded Docs x 426 ops/sec ±2.08% (86 runs sampled)
Update - Mongoose - Multiple Documents x 298 ops/sec ±8.82% (75 runs sampled)
Update - Driver - Multiple Documents x 505 ops/sec ±2.46% (85 runs sampled)
Update - Mongoose - pop and push x 30.26 ops/sec ±14.56% (44 runs sampled)
Update - Mongoose - Array Manipulation, parallel ops x 274 ops/sec ±5.42% (73 runs sampled)
Update - Mongoose - findOneAndModify x 267 ops/sec ±7.90% (65 runs sampled)
Update - Mongoose - find and update, separate ops x 265 ops/sec ±8.33% (53 runs sampled)

read

Read - Mongoose - Basic x 579 ops/sec ±2.23% (86 runs sampled)
Read - Driver - Basic x 681 ops/sec ±1.15% (88 runs sampled)
Read - Mongoose - With lean x 618 ops/sec ±2.12% (86 runs sampled)
Read - Mongoose - Multiple Items x 168 ops/sec ±6.78% (61 runs sampled)
Read - Driver - Multiple Items x 487 ops/sec ±3.91% (84 runs sampled)
Read - Mongoose - Non-index x 213 ops/sec ±6.06% (66 runs sampled)
Read - Driver - Non-index x 459 ops/sec ±0.71% (88 runs sampled)
Read - Mongoose - Embedded Docs x 315 ops/sec ±7.50% (68 runs sampled)
Read - Driver - Embedded Docs x 664 ops/sec ±0.96% (85 runs sampled)

casting

Casting - Embedded Docs - 0 Docs x 3,160 ops/sec ±8.42% (49 runs sampled)
Casting - Embedded Docs - 10 Docs x 3,212 ops/sec ±8.15% (52 runs sampled)
Casting - Embedded Docs - 100 Docs x 3,047 ops/sec ±8.08% (48 runs sampled)
Casting - Embedded Docs - 1000 Docs x 1,956 ops/sec ±10.64% (44 runs sampled)
Casting - Embedded Docs - 10000 Docs x 469 ops/sec ±11.06% (37 runs sampled)

population

Populate - 1 value x 512 ops/sec ±3.64% (86 runs sampled)
Populate - 10 values x 339 ops/sec ±6.14% (75 runs sampled)
Populate - 100 values x 65.41 ops/sec ±5.88% (56 runs sampled)
Populate - 1000 values x 11.89 ops/sec ±7.85% (48 runs sampled)
Populate - 10000 values x 3.11 ops/sec ±5.10% (20 runs sampled)
Populate - 5 properties x 12.44 ops/sec ±7.16% (38 runs sampled)
Populate - 10 properties x 9.53 ops/sec ±6.11% (49 runs sampled)

multiop

Multi-Op - Mongoose - Heavy Read, low write x 6.91 ops/sec ±7.80% (38 runs sampled)
Multi-Op - Driver - Heavy Read, low write x 12.40 ops/sec ±3.10% (34 runs sampled)
Multi-Op - Mongoose - Embedded Docs - Heavy Read, low write x 1.72 ops/sec ±8.50% (13 runs sampled)
Multi-Op - Driver - Embedded Docs - Heavy Read, low write x 10.65 ops/sec ±3.92% (53 runs sampled)
Multi-Op - Mongoose - Heavy Write, low read x 4.43 ops/sec ±6.67% (26 runs sampled)
Multi-Op - Driver - Heavy Write, low read x 8.59 ops/sec ±2.48% (44 runs sampled)
Multi-Op - Mongoose - Embedded Docs - Heavy Write, low read x 0.64 ops/sec ±3.08% (8 runs sampled)
Multi-Op - Driver - Embedded Docs - Heavy Write, low read x 5.26 ops/sec ±3.10% (29 runs sampled)
Multi-Op - Mongoose - Embedded Docs - Read-write-update x 1.32 ops/sec ±7.88% (11 runs sampled)
Multi-Op - Driver - Embedded Docs - Read-write-update x 8.35 ops/sec ±3.84% (42 runs sampled)

@refack
Copy link
Contributor Author

refack commented Sep 29, 2013

Now works with both "global" mongoose.set(...) and local Schema(..., {pluralization:false});

@ebensing
Copy link
Contributor

Benchmarks for e929716:
insert

Insert - Mongoose - Basic x 391 ops/sec ±8.91% (72 runs sampled)
Insert - Driver - Basic x 575 ops/sec ±3.05% (82 runs sampled)
Insert - Mongoose - Embedded Docs x 98.93 ops/sec ±10.47% (52 runs sampled)
Insert - Driver - Embedded Docs x 466 ops/sec ±7.27% (81 runs sampled)

delete

Delete - Mongoose x 584 ops/sec ±1.92% (86 runs sampled)
Delete - Driver x 611 ops/sec ±0.93% (80 runs sampled)

update

Update - Mongoose - Basic x 521 ops/sec ±3.37% (85 runs sampled)
Update - Driver - Basic x 593 ops/sec ±1.10% (87 runs sampled)
Update - Mongoose - Embedded Docs x 92.99 ops/sec ±8.12% (53 runs sampled)
Update - Driver - Embdedded Docs x 443 ops/sec ±1.54% (88 runs sampled)
Update - Mongoose - Multiple Documents x 310 ops/sec ±6.30% (78 runs sampled)
Update - Driver - Multiple Documents x 490 ops/sec ±6.62% (82 runs sampled)
Update - Mongoose - pop and push x 27.03 ops/sec ±14.97% (41 runs sampled)
Update - Mongoose - Array Manipulation, parallel ops x 263 ops/sec ±5.47% (72 runs sampled)
Update - Mongoose - findOneAndModify x 273 ops/sec ±8.51% (65 runs sampled)
Update - Mongoose - find and update, separate ops x 268 ops/sec ±8.30% (58 runs sampled)

read

Read - Mongoose - Basic x 598 ops/sec ±1.50% (89 runs sampled)
Read - Driver - Basic x 691 ops/sec ±1.02% (89 runs sampled)
Read - Mongoose - With lean x 618 ops/sec ±2.25% (86 runs sampled)
Read - Mongoose - Multiple Items x 166 ops/sec ±7.19% (60 runs sampled)
Read - Driver - Multiple Items x 492 ops/sec ±3.02% (85 runs sampled)
Read - Mongoose - Non-index x 213 ops/sec ±5.97% (65 runs sampled)
Read - Driver - Non-index x 462 ops/sec ±0.62% (89 runs sampled)
Read - Mongoose - Embedded Docs x 295 ops/sec ±8.51% (67 runs sampled)
Read - Driver - Embedded Docs x 660 ops/sec ±1.15% (84 runs sampled)

casting

Casting - Embedded Docs - 0 Docs x 3,218 ops/sec ±8.61% (53 runs sampled)
Casting - Embedded Docs - 10 Docs x 3,306 ops/sec ±8.74% (53 runs sampled)
Casting - Embedded Docs - 100 Docs x 2,970 ops/sec ±8.89% (46 runs sampled)
Casting - Embedded Docs - 1000 Docs x 1,888 ops/sec ±11.85% (42 runs sampled)
Casting - Embedded Docs - 10000 Docs x 459 ops/sec ±11.76% (37 runs sampled)

population

Populate - 1 value x 516 ops/sec ±3.62% (87 runs sampled)
Populate - 10 values x 333 ops/sec ±6.71% (75 runs sampled)
Populate - 100 values x 60.09 ops/sec ±6.27% (44 runs sampled)
Populate - 1000 values x 10.66 ops/sec ±6.74% (29 runs sampled)
Populate - 10000 values x 3.12 ops/sec ±4.71% (20 runs sampled)
Populate - 5 properties x 12.53 ops/sec ±6.38% (39 runs sampled)
Populate - 10 properties x 9.30 ops/sec ±6.92% (48 runs sampled)

multiop

Multi-Op - Mongoose - Heavy Read, low write x 6.98 ops/sec ±7.47% (37 runs sampled)
Multi-Op - Driver - Heavy Read, low write x 12.78 ops/sec ±3.31% (40 runs sampled)
Multi-Op - Mongoose - Embedded Docs - Heavy Read, low write x 1.71 ops/sec ±7.46% (13 runs sampled)
Multi-Op - Driver - Embedded Docs - Heavy Read, low write x 10.46 ops/sec ±4.04% (52 runs sampled)
Multi-Op - Mongoose - Heavy Write, low read x 4.47 ops/sec ±6.32% (26 runs sampled)
Multi-Op - Driver - Heavy Write, low read x 8.60 ops/sec ±3.13% (44 runs sampled)
Multi-Op - Mongoose - Embedded Docs - Heavy Write, low read x 0.58 ops/sec ±10.29% (7 runs sampled)
Multi-Op - Driver - Embedded Docs - Heavy Write, low read x 5.19 ops/sec ±3.43% (29 runs sampled)
Multi-Op - Mongoose - Embedded Docs - Read-write-update x 1.39 ops/sec ±7.54% (11 runs sampled)
Multi-Op - Driver - Embedded Docs - Read-write-update x 8.16 ops/sec ±3.99% (43 runs sampled)

@ebensing
Copy link
Contributor

Benchmarks for ba3f54f:
insert

Insert - Mongoose - Basic x 289 ops/sec ±45.31% (70 runs sampled)
Insert - Driver - Basic x 562 ops/sec ±4.83% (82 runs sampled)
Insert - Mongoose - Embedded Docs x 94.31 ops/sec ±12.96% (53 runs sampled)
Insert - Driver - Embedded Docs x 511 ops/sec ±4.02% (85 runs sampled)

delete

Delete - Mongoose x 574 ops/sec ±1.96% (84 runs sampled)
Delete - Driver x 618 ops/sec ±1.07% (86 runs sampled)

update

Update - Mongoose - Basic x 495 ops/sec ±4.47% (82 runs sampled)
Update - Driver - Basic x 587 ops/sec ±1.14% (87 runs sampled)
Update - Mongoose - Embedded Docs x 91.34 ops/sec ±9.24% (49 runs sampled)
Update - Driver - Embdedded Docs x 430 ops/sec ±2.47% (84 runs sampled)
Update - Mongoose - Multiple Documents x 320 ops/sec ±4.87% (79 runs sampled)
Update - Driver - Multiple Documents x 522 ops/sec ±1.30% (87 runs sampled)
Update - Mongoose - pop and push x 30.53 ops/sec ±15.11% (47 runs sampled)
Update - Mongoose - Array Manipulation, parallel ops x 281 ops/sec ±5.18% (76 runs sampled)
Update - Mongoose - findOneAndModify x 261 ops/sec ±8.95% (64 runs sampled)
Update - Mongoose - find and update, separate ops x 281 ops/sec ±7.67% (66 runs sampled)

read

Read - Mongoose - Basic x 593 ops/sec ±1.55% (87 runs sampled)
Read - Driver - Basic x 690 ops/sec ±1.02% (89 runs sampled)
Read - Mongoose - With lean x 619 ops/sec ±2.44% (87 runs sampled)
Read - Mongoose - Multiple Items x 173 ops/sec ±6.72% (60 runs sampled)
Read - Driver - Multiple Items x 486 ops/sec ±3.74% (84 runs sampled)
Read - Mongoose - Non-index x 209 ops/sec ±6.16% (63 runs sampled)
Read - Driver - Non-index x 458 ops/sec ±0.63% (87 runs sampled)
Read - Mongoose - Embedded Docs x 306 ops/sec ±7.00% (72 runs sampled)
Read - Driver - Embedded Docs x 655 ops/sec ±1.48% (72 runs sampled)

casting

Casting - Embedded Docs - 0 Docs x 3,071 ops/sec ±9.10% (51 runs sampled)
Casting - Embedded Docs - 10 Docs x 3,247 ops/sec ±9.74% (50 runs sampled)
Casting - Embedded Docs - 100 Docs x 3,110 ops/sec ±8.96% (50 runs sampled)
Casting - Embedded Docs - 1000 Docs x 2,037 ops/sec ±10.94% (44 runs sampled)
Casting - Embedded Docs - 10000 Docs x 451 ops/sec ±12.18% (37 runs sampled)

population

Populate - 1 value x 500 ops/sec ±3.61% (84 runs sampled)
Populate - 10 values x 299 ops/sec ±6.57% (70 runs sampled)
Populate - 100 values x 65.18 ops/sec ±6.04% (47 runs sampled)
Populate - 1000 values x 11.46 ops/sec ±8.29% (43 runs sampled)
Populate - 10000 values x 3.22 ops/sec ±5.19% (20 runs sampled)
Populate - 5 properties x 12.29 ops/sec ±6.53% (33 runs sampled)
Populate - 10 properties x 9.31 ops/sec ±6.52% (48 runs sampled)

multiop

Multi-Op - Mongoose - Heavy Read, low write x 7.26 ops/sec ±5.21% (38 runs sampled)
Multi-Op - Driver - Heavy Read, low write x 12.75 ops/sec ±5.88% (42 runs sampled)
Multi-Op - Mongoose - Embedded Docs - Heavy Read, low write x 1.74 ops/sec ±6.20% (13 runs sampled)
Multi-Op - Driver - Embedded Docs - Heavy Read, low write x 10.11 ops/sec ±3.61% (51 runs sampled)
Multi-Op - Mongoose - Heavy Write, low read x 4.09 ops/sec ±7.08% (24 runs sampled)
Multi-Op - Driver - Heavy Write, low read x 8.32 ops/sec ±3.21% (43 runs sampled)
Multi-Op - Mongoose - Embedded Docs - Heavy Write, low read x 0.59 ops/sec ±8.42% (8 runs sampled)
Multi-Op - Driver - Embedded Docs - Heavy Write, low read x 5.41 ops/sec ±5.41% (31 runs sampled)
Multi-Op - Mongoose - Embedded Docs - Read-write-update x 1.33 ops/sec ±7.68% (11 runs sampled)
Multi-Op - Driver - Embedded Docs - Read-write-update x 8.30 ops/sec ±4.56% (44 runs sampled)

@aheckmann
Copy link
Collaborator

merged. thanks!

@aheckmann aheckmann closed this Oct 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants