diff options
author | Dwight <dmerriman@gmail.com> | 2008-06-06 09:43:15 -0400 |
---|---|---|
committer | Dwight <dmerriman@gmail.com> | 2008-06-06 09:43:15 -0400 |
commit | 3051b961cac30f9bf81ac72b816ddb5e8e3c2ee9 (patch) | |
tree | 85a5b1cb376b067eee5cf668d42deff78a870627 /db/introspect.cpp | |
parent | 877b72efcdd55f9fc9b271c707d4b489e551793d (diff) | |
download | mongo-3051b961cac30f9bf81ac72b816ddb5e8e3c2ee9.tar.gz |
dos2unix
Diffstat (limited to 'db/introspect.cpp')
-rw-r--r-- | db/introspect.cpp | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/db/introspect.cpp b/db/introspect.cpp index 95bbc73879a..34db42a143d 100644 --- a/db/introspect.cpp +++ b/db/introspect.cpp @@ -1,39 +1,39 @@ -// introspect.cpp
-
-#include "stdafx.h"
-#include "introspect.h"
-#include "../util/builder.h"
-#include "../util/goodies.h"
-#include "pdfile.h"
-#include "jsobj.h"
-#include "pdfile.h"
-
-typedef map<string,Cursor*> StringToCursor;
-StringToCursor *specialNamespaces;
-
-auto_ptr<Cursor> getSpecialCursor(const char *ns) {
- StringToCursor::iterator it = specialNamespaces->find(ns);
- return auto_ptr<Cursor>
- (it == specialNamespaces->end() ?
- 0 : it->second->clone());
-}
-
-void SingleResultObjCursor::reg(const char *as) {
- if( specialNamespaces == 0 )
- specialNamespaces = new StringToCursor();
- if( specialNamespaces->count(as) == 0 ) {
- (*specialNamespaces)[as] = this;
- }
-}
-
-void profile(const char *str,
- int millis)
-{
- JSObjBuilder b;
- b.appendDate("ts", jsTime());
- b.append("info", str);
- b.append("millis", (double) millis);
- JSObj p = b.done();
- theDataFileMgr.insert(client->profileName.c_str(),
- p.objdata(), p.objsize(), true);
-}
+// introspect.cpp + +#include "stdafx.h" +#include "introspect.h" +#include "../util/builder.h" +#include "../util/goodies.h" +#include "pdfile.h" +#include "jsobj.h" +#include "pdfile.h" + +typedef map<string,Cursor*> StringToCursor; +StringToCursor *specialNamespaces; + +auto_ptr<Cursor> getSpecialCursor(const char *ns) { + StringToCursor::iterator it = specialNamespaces->find(ns); + return auto_ptr<Cursor> + (it == specialNamespaces->end() ? + 0 : it->second->clone()); +} + +void SingleResultObjCursor::reg(const char *as) { + if( specialNamespaces == 0 ) + specialNamespaces = new StringToCursor(); + if( specialNamespaces->count(as) == 0 ) { + (*specialNamespaces)[as] = this; + } +} + +void profile(const char *str, + int millis) +{ + JSObjBuilder b; + b.appendDate("ts", jsTime()); + b.append("info", str); + b.append("millis", (double) millis); + JSObj p = b.done(); + theDataFileMgr.insert(client->profileName.c_str(), + p.objdata(), p.objsize(), true); +} |