~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to serve-branches

  • Committer: Robert Collins
  • Date: 2008-11-14 06:36:13 UTC
  • mto: This revision was merged to the branch mainline in revision 239.
  • Revision ID: robertc@robertcollins.net-20081114063613-tyri1gza6hafvx3b
Allow lsprofile data on requests to be gathered.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
    parser.add_option("--prefix", dest="user_prefix",
52
52
                      help="Specify host prefix.")
53
53
    parser.add_option("--profile", action="store_true", dest="profile",
54
 
                      help="Adds profiling information to the HTML of "
55
 
                      "each request.")
 
54
                      help="Generate callgrind profile data to "
 
55
                        "%d-stats.callgrind on each request.")
56
56
    parser.add_option("--reload", action="store_true", dest="reload",
57
57
                      help="Restarts the application when changing python"
58
58
                           " files. Only used for development purposes.")
120
120
    app = HTTPExceptionHandler(app)
121
121
    app = TransLogger(app, logger=logger)
122
122
    if options.profile:
123
 
        from loggerhead.middleware.profile import CProfileMiddleware
124
 
        app = CProfileMiddleware(app)
 
123
        from loggerhead.middleware.profile import LSProfMiddleware
 
124
        app = LSProfMiddleware(app)
125
125
 
126
126
    if not options.user_prefix:
127
127
        prefix = '/'