: Why does SolrCore.setResponseHeaderValues(...) set the QTime (and other : response header options) instead of having it as a function of
the main reason was to ensure that that data would *always* be there no matter who wrote a request handler (or wether or not they subclassed the RequestHandlerBase ... it's a backwards compatibility issue, we want to ensure that data even if you have a custom request handler you've been using since Solr 1.1 (or earlier) : RequestHandlerBase? If things were tracked in the RequestHandlers you : could add timing information there: avg query time, etc. I know some you still can track those things, and return that data or log that data as well ... although if you really wnated to know how long the *whole* request took you would need to do it in teh ResponseWriter (or in the core, after the response has been written) : I'm happy to make the changes and supply a patch to move the logic as : well as adding a few simple metrics unless enough people on this thread : really feel that it's always better to do it with log files and : postmortem math. moving the logic would be bad .. adding new helper utilities to the RequestHandler Base for handlers that want to do more sounds fine to me. see also http://issues.apache.org/jira/browse/SOLR-176 which already adds a lot of timing info to requests. -Hoss