[SERVER-1507] option in shell to print how long each command takes and certain stats Created: 28/Jul/10 Updated: 12/Jul/16 Resolved: 27/Sep/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | None |
| Fix Version/s: | 2.1.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Eliot Horowitz (Inactive) | Assignee: | Antoine Girbal |
| Resolution: | Done | Votes: | 2 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Comments |
| Comment by auto [ 05/Oct/11 ] |
|
Author: {u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}Message: -
|
| Comment by Antoine Girbal [ 26/Sep/11 ] |
|
output for find is displayed in the cursor iteration loop, like: .. { "_id" : ObjectId("4de8f6b3ceadffd21635ba45"), "userId" : 0, "text" : "blahblah", "votes" : 8 } { "_id" : ObjectId("4de8f6b3ceadffd21635ba47"), "userId" : 13, "text" : "blahblah", "votes" : 11 } { "_id" : ObjectId("4de8f6b3ceadffd21635ba49"), "userId" : 36, "text" : "blahblah", "votes" : 12 }Fetched 20 record(s) in 8ms |
| Comment by auto [ 26/Sep/11 ] |
|
Author: {u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}Message: |
| Comment by Antoine Girbal [ 26/Sep/11 ] |
|
Added a method to do: But I kept a regular method for it because this syntax cannot get called from a script and we cant test it. |
| Comment by auto [ 26/Sep/11 ] |
|
Author: {u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}Message: |
| Comment by Eliot Horowitz (Inactive) [ 22/Sep/11 ] |
|
Should also show time for queries. Not sure about name. Also maybe shouldn't be a function, but follow shell model. set verbose true |
| Comment by auto [ 21/Sep/11 ] |
|
Author: {u'login': u'kchodorow', u'name': u'Kristina', u'email': u'kristina@10gen.com'}Message: fix |
| Comment by auto [ 21/Sep/11 ] |
|
Author: {u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}Message: |
| Comment by auto [ 20/Sep/11 ] |
|
Author: {u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}Message: |
| Comment by Antoine Girbal [ 20/Sep/11 ] |
|
Moved at shell level: PRIMARY> setVerboseShell() , {b:1}) , {b:1}) , {b:1}) |
| Comment by auto [ 20/Sep/11 ] |
|
Author: {u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}Message: |
| Comment by Eliot Horowitz (Inactive) [ 20/Sep/11 ] |
|
new Mongo( "foo.com" ) not a command line option. |
| Comment by Antoine Girbal [ 20/Sep/11 ] |
|
right now the option is at the "mongo" level. |
| Comment by Eliot Horowitz (Inactive) [ 20/Sep/11 ] |
|
Not sure this is implemented the right way. This way from what I can tell, if I open 2 Mongo connections, its only set on one of them. Should probably be a shell level setting, not a connection level. |
| Comment by Antoine Girbal [ 20/Sep/11 ] |
|
in theory it should also work for inserts, but "n" is always 0 in the lastError. ) , |
| Comment by Antoine Girbal [ 20/Sep/11 ] |
|
This option is called verboseShell, it is available as a command. ) , {b:1}) ) , {b:1}) |
| Comment by auto [ 20/Sep/11 ] |
|
Author: {u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}Message: |
| Comment by Eliot Horowitz (Inactive) [ 20/Sep/11 ] |
|
For now - we should make it an option. |
| Comment by Antoine Girbal [ 19/Sep/11 ] |
|
also this would avoid calling getLastError whenever an operation does not return a result in the shell. |
| Comment by Antoine Girbal [ 19/Sep/11 ] |
|
Most likely this feature doesnt make sense for find() type of operations, since the result is handled by a cursor. So planning to implement this for "write" type of commands like update, remove which currently print nothing. PRIMARY> db.getMongo().setExtraInfo() , {a: 0}) ) I feel that the info is non intrusive and necessary for admin. |