Permalink
Browse files

Add execution time in find panel.

  • Loading branch information...
1 parent dfef3b1 commit 380f08a65866b9b153d8276c51ca7542cbc57fb2 @bububa committed Jan 26, 2011
Showing with 4 additions and 3 deletions.
  1. +2 −2 MongoDB.mm
  2. +2 −1 QueryWindowController.mm
View
@@ -558,8 +558,8 @@ - (void) removeInDB:(NSString *)dbname
NSString *col = [NSString stringWithFormat:@"%@.%@", dbname, collectionname];
mongo::BSONObj criticalBSON;
if ([critical isPresent]) {
- NSError *error = nil;
- /*SBJSON *json = [SBJSON new];
+ /*NSError *error = nil;
+ SBJSON *json = [SBJSON new];
[json objectWithString:critical error:&error];
[json release];
if (error) {
@@ -136,6 +136,7 @@ - (IBAction)findQuery:(id)sender
- (void)doFindQuery {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ NSTimeInterval speed = [NSDate timeIntervalSinceReferenceDate];
[findQueryLoaderIndicator start];
NSString *user=nil;
NSString *password=nil;
@@ -169,7 +170,7 @@ - (void)doFindQuery {
user:user
password:password
critical:critical];
- [totalResultsTextField setStringValue:[NSString stringWithFormat:@"Total Results: %d", total]];
+ [totalResultsTextField setStringValue:[NSString stringWithFormat:@"Total Results: %d (%0.2fs)", total, [NSDate timeIntervalSinceReferenceDate]-speed]];
findResultsViewController.results = results;
[findResultsViewController.myOutlineView reloadData];
[results release];

0 comments on commit 380f08a

Please sign in to comment.