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

Don't pluralize model names not ending with letters #1704

Closed
wants to merge 3 commits into from

Conversation

refack
Copy link
Contributor

@refack refack commented Sep 21, 2013

Closes #1703

@ebensing
Copy link
Contributor

Benchmarks for f3e8ba6:
insert

Insert - Mongoose - Basic x 399 ops/sec ±5.88% (75 runs sampled)
Insert - Driver - Basic x 567 ops/sec ±7.30% (88 runs sampled)
Insert - Mongoose - Embedded Docs x 103 ops/sec ±9.15% (54 runs sampled)
Insert - Driver - Embedded Docs x 522 ops/sec ±1.61% (86 runs sampled)

delete

Delete - Mongoose x 568 ops/sec ±4.61% (85 runs sampled)
Delete - Driver x 626 ops/sec ±0.95% (82 runs sampled)

update

Update - Mongoose - Basic x 513 ops/sec ±4.20% (87 runs sampled)
Update - Driver - Basic x 584 ops/sec ±1.60% (88 runs sampled)
Update - Mongoose - Embedded Docs x 91.62 ops/sec ±7.92% (53 runs sampled)
Update - Driver - Embdedded Docs x 420 ops/sec ±2.69% (81 runs sampled)
Update - Mongoose - Multiple Documents x 302 ops/sec ±6.55% (74 runs sampled)
Update - Driver - Multiple Documents x 518 ops/sec ±2.03% (88 runs sampled)
Update - Mongoose - pop and push x 30.49 ops/sec ±16.44% (44 runs sampled)
Update - Mongoose - Array Manipulation, parallel ops x 296 ops/sec ±4.61% (79 runs sampled)
Update - Mongoose - findOneAndModify x 257 ops/sec ±10.31% (62 runs sampled)
Update - Mongoose - find and update, separate ops x 254 ops/sec ±8.15% (63 runs sampled)

read

Read - Mongoose - Basic x 439 ops/sec ±48.63% (87 runs sampled)
Read - Driver - Basic x 678 ops/sec ±0.99% (87 runs sampled)
Read - Mongoose - With lean x 605 ops/sec ±2.34% (85 runs sampled)
Read - Mongoose - Multiple Items x 152 ops/sec ±6.79% (58 runs sampled)
Read - Driver - Multiple Items x 477 ops/sec ±3.27% (82 runs sampled)
Read - Mongoose - Non-index x 190 ops/sec ±7.50% (59 runs sampled)
Read - Driver - Non-index x 422 ops/sec ±2.82% (85 runs sampled)
Read - Mongoose - Embedded Docs x 284 ops/sec ±7.52% (66 runs sampled)
Read - Driver - Embedded Docs x 655 ops/sec ±1.53% (86 runs sampled)

casting

Casting - Embedded Docs - 0 Docs x 2,978 ops/sec ±8.74% (49 runs sampled)
Casting - Embedded Docs - 10 Docs x 3,127 ops/sec ±8.78% (47 runs sampled)
Casting - Embedded Docs - 100 Docs x 2,909 ops/sec ±8.90% (47 runs sampled)
Casting - Embedded Docs - 1000 Docs x 1,754 ops/sec ±11.85% (39 runs sampled)
Casting - Embedded Docs - 10000 Docs x 509 ops/sec ±9.23% (46 runs sampled)

population

Populate - 1 value x 519 ops/sec ±3.52% (85 runs sampled)
Populate - 10 values x 338 ops/sec ±6.08% (76 runs sampled)
Populate - 100 values x 66.21 ops/sec ±7.27% (50 runs sampled)
Populate - 1000 values x 11.83 ops/sec ±6.30% (32 runs sampled)
Populate - 10000 values x 3.12 ops/sec ±5.01% (20 runs sampled)
Populate - 5 properties x 12.16 ops/sec ±7.48% (47 runs sampled)
Populate - 10 properties x 9.06 ops/sec ±8.22% (47 runs sampled)

multiop

Multi-Op - Mongoose - Heavy Read, low write x 7.12 ops/sec ±4.62% (39 runs sampled)
Multi-Op - Driver - Heavy Read, low write x 13.09 ops/sec ±4.81% (54 runs sampled)
Multi-Op - Mongoose - Embedded Docs - Heavy Read, low write x 1.72 ops/sec ±11.93% (13 runs sampled)
Multi-Op - Driver - Embedded Docs - Heavy Read, low write x 10.49 ops/sec ±5.01% (52 runs sampled)
Multi-Op - Mongoose - Heavy Write, low read x 4.15 ops/sec ±7.67% (24 runs sampled)
Multi-Op - Driver - Heavy Write, low read x 8.39 ops/sec ±3.71% (43 runs sampled)
Multi-Op - Mongoose - Embedded Docs - Heavy Write, low read x 0.60 ops/sec ±10.24% (7 runs sampled)
Multi-Op - Driver - Embedded Docs - Heavy Write, low read x 5.31 ops/sec ±3.54% (30 runs sampled)
Multi-Op - Mongoose - Embedded Docs - Read-write-update x 1.33 ops/sec ±5.36% (11 runs sampled)
Multi-Op - Driver - Embedded Docs - Read-write-update x 8.13 ops/sec ±5.33% (42 runs sampled)

@ebensing
Copy link
Contributor

Benchmarks for bc75c5b:
insert

Insert - Mongoose - Basic x 281 ops/sec ±56.27% (74 runs sampled)
Insert - Driver - Basic x 585 ops/sec ±2.88% (86 runs sampled)
Insert - Mongoose - Embedded Docs x 102 ops/sec ±9.21% (54 runs sampled)
Insert - Driver - Embedded Docs x 497 ops/sec ±6.57% (82 runs sampled)

delete

Delete - Mongoose x 578 ops/sec ±3.05% (85 runs sampled)
Delete - Driver x 609 ops/sec ±0.81% (87 runs sampled)

update

Update - Mongoose - Basic x 470 ops/sec ±4.78% (81 runs sampled)
Update - Driver - Basic x 556 ops/sec ±2.85% (82 runs sampled)
Update - Mongoose - Embedded Docs x 85.47 ops/sec ±9.80% (49 runs sampled)
Update - Driver - Embdedded Docs x 395 ops/sec ±4.08% (80 runs sampled)
Update - Mongoose - Multiple Documents x 259 ops/sec ±6.69% (69 runs sampled)
Update - Driver - Multiple Documents x 466 ops/sec ±5.99% (81 runs sampled)
Update - Mongoose - pop and push x 29.27 ops/sec ±10.53% (53 runs sampled)
Update - Mongoose - Array Manipulation, parallel ops x 265 ops/sec ±5.96% (72 runs sampled)
Update - Mongoose - findOneAndModify x 279 ops/sec ±7.77% (65 runs sampled)
Update - Mongoose - find and update, separate ops x 255 ops/sec ±9.75% (64 runs sampled)

read

Read - Mongoose - Basic x 593 ops/sec ±1.52% (87 runs sampled)
Read - Driver - Basic x 689 ops/sec ±1.06% (89 runs sampled)
Read - Mongoose - With lean x 621 ops/sec ±1.89% (87 runs sampled)
Read - Mongoose - Multiple Items x 156 ops/sec ±6.10% (56 runs sampled)
Read - Driver - Multiple Items x 484 ops/sec ±4.15% (83 runs sampled)
Read - Mongoose - Non-index x 211 ops/sec ±5.96% (63 runs sampled)
Read - Driver - Non-index x 457 ops/sec ±0.70% (80 runs sampled)
Read - Mongoose - Embedded Docs x 318 ops/sec ±6.55% (72 runs sampled)
Read - Driver - Embedded Docs x 660 ops/sec ±0.92% (86 runs sampled)

casting

Casting - Embedded Docs - 0 Docs x 3,194 ops/sec ±8.58% (53 runs sampled)
Casting - Embedded Docs - 10 Docs x 3,333 ops/sec ±9.02% (52 runs sampled)
Casting - Embedded Docs - 100 Docs x 2,918 ops/sec ±9.30% (48 runs sampled)
Casting - Embedded Docs - 1000 Docs x 1,831 ops/sec ±10.96% (40 runs sampled)
Casting - Embedded Docs - 10000 Docs x 498 ops/sec ±12.54% (39 runs sampled)

population

Populate - 1 value x 512 ops/sec ±5.25% (86 runs sampled)
Populate - 10 values x 351 ops/sec ±5.72% (76 runs sampled)
Populate - 100 values x 60.61 ops/sec ±7.77% (51 runs sampled)
Populate - 1000 values x 10.42 ops/sec ±7.47% (35 runs sampled)
Populate - 10000 values x 3.06 ops/sec ±5.30% (19 runs sampled)
Populate - 5 properties x 11.91 ops/sec ±7.02% (36 runs sampled)
Populate - 10 properties x 9.37 ops/sec ±7.12% (48 runs sampled)

multiop

Multi-Op - Mongoose - Heavy Read, low write x 6.93 ops/sec ±6.52% (38 runs sampled)
Multi-Op - Driver - Heavy Read, low write x 12.79 ops/sec ±3.87% (46 runs sampled)
Multi-Op - Mongoose - Embedded Docs - Heavy Read, low write x 1.49 ops/sec ±13.28% (11 runs sampled)
Multi-Op - Driver - Embedded Docs - Heavy Read, low write x 10.17 ops/sec ±5.10% (51 runs sampled)
Multi-Op - Mongoose - Heavy Write, low read x 4.32 ops/sec ±6.16% (25 runs sampled)
Multi-Op - Driver - Heavy Write, low read x 8.19 ops/sec ±3.59% (43 runs sampled)
Multi-Op - Mongoose - Embedded Docs - Heavy Write, low read x 0.58 ops/sec ±10.21% (7 runs sampled)
Multi-Op - Driver - Embedded Docs - Heavy Write, low read x 5.00 ops/sec ±2.39% (29 runs sampled)
Multi-Op - Mongoose - Embedded Docs - Read-write-update x 1.32 ops/sec ±5.15% (11 runs sampled)
Multi-Op - Driver - Embedded Docs - Read-write-update x 8.23 ops/sec ±3.81% (43 runs sampled)

Maybe one day be a full pluralization test
@ebensing
Copy link
Contributor

Benchmarks for d079116:
insert

Insert - Mongoose - Basic x 407 ops/sec ±5.91% (76 runs sampled)
Insert - Driver - Basic x 581 ops/sec ±4.22% (85 runs sampled)
Insert - Mongoose - Embedded Docs x 107 ops/sec ±7.83% (56 runs sampled)
Insert - Driver - Embedded Docs x 507 ops/sec ±4.95% (83 runs sampled)

delete

Delete - Mongoose x 579 ops/sec ±1.90% (87 runs sampled)
Delete - Driver x 620 ops/sec ±0.88% (88 runs sampled)

update

Update - Mongoose - Basic x 520 ops/sec ±3.47% (85 runs sampled)
Update - Driver - Basic x 593 ops/sec ±1.28% (87 runs sampled)
Update - Mongoose - Embedded Docs x 92.07 ops/sec ±8.73% (55 runs sampled)
Update - Driver - Embdedded Docs x 439 ops/sec ±1.75% (88 runs sampled)
Update - Mongoose - Multiple Documents x 258 ops/sec ±35.24% (70 runs sampled)
Update - Driver - Multiple Documents x 484 ops/sec ±3.87% (82 runs sampled)
Update - Mongoose - pop and push x 30.59 ops/sec ±13.06% (55 runs sampled)
Update - Mongoose - Array Manipulation, parallel ops x 279 ops/sec ±5.23% (74 runs sampled)
Update - Mongoose - findOneAndModify x 277 ops/sec ±8.26% (65 runs sampled)
Update - Mongoose - find and update, separate ops x 267 ops/sec ±8.98% (65 runs sampled)

read

Read - Mongoose - Basic x 586 ops/sec ±1.85% (84 runs sampled)
Read - Driver - Basic x 687 ops/sec ±0.97% (88 runs sampled)
Read - Mongoose - With lean x 622 ops/sec ±0.93% (88 runs sampled)
Read - Mongoose - Multiple Items x 152 ops/sec ±6.89% (56 runs sampled)
Read - Driver - Multiple Items x 479 ops/sec ±4.54% (83 runs sampled)
Read - Mongoose - Non-index x 189 ops/sec ±7.22% (59 runs sampled)
Read - Driver - Non-index x 437 ops/sec ±1.84% (87 runs sampled)
Read - Mongoose - Embedded Docs x 296 ops/sec ±7.34% (68 runs sampled)
Read - Driver - Embedded Docs x 649 ops/sec ±1.51% (83 runs sampled)

casting

Casting - Embedded Docs - 0 Docs x 2,824 ops/sec ±9.43% (47 runs sampled)
Casting - Embedded Docs - 10 Docs x 2,992 ops/sec ±10.34% (47 runs sampled)
Casting - Embedded Docs - 100 Docs x 2,866 ops/sec ±9.65% (47 runs sampled)
Casting - Embedded Docs - 1000 Docs x 1,870 ops/sec ±10.69% (42 runs sampled)
Casting - Embedded Docs - 10000 Docs x 453 ops/sec ±11.93% (44 runs sampled)

population

Populate - 1 value x 510 ops/sec ±3.95% (86 runs sampled)
Populate - 10 values x 312 ops/sec ±6.01% (62 runs sampled)
Populate - 100 values x 61.06 ops/sec ±7.07% (51 runs sampled)
Populate - 1000 values x 10.79 ops/sec ±8.80% (35 runs sampled)
Populate - 10000 values x 3.18 ops/sec ±5.02% (20 runs sampled)
Populate - 5 properties x 11.93 ops/sec ±6.59% (41 runs sampled)
Populate - 10 properties x 9.39 ops/sec ±6.53% (49 runs sampled)

multiop

Multi-Op - Mongoose - Heavy Read, low write x 7.31 ops/sec ±6.36% (40 runs sampled)
Multi-Op - Driver - Heavy Read, low write x 13.08 ops/sec ±5.32% (47 runs sampled)
Multi-Op - Mongoose - Embedded Docs - Heavy Read, low write x 1.76 ops/sec ±8.00% (13 runs sampled)
Multi-Op - Driver - Embedded Docs - Heavy Read, low write x 10.37 ops/sec ±3.58% (52 runs sampled)
Multi-Op - Mongoose - Heavy Write, low read x 4.44 ops/sec ±5.94% (26 runs sampled)
Multi-Op - Driver - Heavy Write, low read x 8.28 ops/sec ±3.66% (43 runs sampled)
Multi-Op - Mongoose - Embedded Docs - Heavy Write, low read x 0.61 ops/sec ±7.35% (8 runs sampled)
Multi-Op - Driver - Embedded Docs - Heavy Write, low read x 5.46 ops/sec ±3.95% (31 runs sampled)
Multi-Op - Mongoose - Embedded Docs - Read-write-update x 1.40 ops/sec ±5.03% (11 runs sampled)
Multi-Op - Driver - Embedded Docs - Read-write-update x 8.24 ops/sec ±3.89% (42 runs sampled)

@aheckmann
Copy link
Collaborator

merged! thanks. this will go into 3.7.x

@aheckmann aheckmann closed this Sep 22, 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.

Until 1350 - Don't pluralize collection names that don't end with a lowercase letter
3 participants