Revision 1298
Added by Jing Tao over 22 years ago
src/edu/ucsb/nceas/metacat/MetaCatServlet.java | ||
---|---|---|
528 | 528 |
String xmlquery = ((String[])params.get("query"))[0]; |
529 | 529 |
String qformat = ((String[])params.get("qformat"))[0]; |
530 | 530 |
String resultdoc = null; |
531 |
|
|
531 |
MetaCatUtil.debugMessage("xmlquery: "+xmlquery, 30); |
|
532 |
double startTime = System.currentTimeMillis()/1000; |
|
532 | 533 |
Hashtable doclist = runQuery(xmlquery, user, groups); |
533 |
|
|
534 |
double docListTime = System.currentTimeMillis()/1000; |
|
535 |
MetaCatUtil.debugMessage("Time for getting doc list: " |
|
536 |
+(docListTime-startTime), 30); |
|
537 |
|
|
534 | 538 |
resultdoc = createResultDocument(doclist, transformQuery(xmlquery)); |
535 |
|
|
536 |
//format and transform the results |
|
539 |
double toStringTime = System.currentTimeMillis()/1000; |
|
540 |
MetaCatUtil.debugMessage("Time to create xml string: " |
|
541 |
+(toStringTime-docListTime), 30); |
|
542 |
//format and transform the results |
|
543 |
double outPutTime = 0; |
|
537 | 544 |
if(qformat.equals("xml")) { |
538 | 545 |
response.setContentType("text/xml"); |
539 | 546 |
out.println(resultdoc); |
547 |
outPutTime = System.currentTimeMillis()/1000; |
|
548 |
MetaCatUtil.debugMessage("Output time: "+(outPutTime-toStringTime), 30); |
|
540 | 549 |
} else { |
541 | 550 |
transformResultset(resultdoc, response, out, qformat); |
551 |
outPutTime = System.currentTimeMillis()/1000; |
|
552 |
MetaCatUtil.debugMessage("Output time: "+(outPutTime-toStringTime), 30); |
|
542 | 553 |
} |
543 | 554 |
} |
544 |
|
|
555 |
|
|
545 | 556 |
/** |
546 | 557 |
* Create the xml query, execute it and display the results. |
547 | 558 |
* |
Also available in: Unified diff
Add some debug message for displaying search time.