return lowest level stats as well as computed stats

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@680553 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Chris M. Hostetter 2008-07-28 22:50:08 +00:00
parent 0cda9c8825
commit c2917b47e4
1 changed files with 2 additions and 0 deletions

View File

@ -165,9 +165,11 @@ public abstract class RequestHandlerBase implements SolrRequestHandler, SolrInfo
public NamedList getStatistics() {
NamedList lst = new SimpleOrderedMap();
lst.add("handlerStart",handlerStart);
lst.add("requests", numRequests);
lst.add("errors", numErrors);
lst.add("timeouts", numTimeouts);
lst.add("totalTime",totalTime);
lst.add("avgTimePerRequest", (float) totalTime / (float) this.numRequests);
lst.add("avgRequestsPerSecond", (float) numRequests*1000 / (float)(System.currentTimeMillis()-handlerStart));
return lst;