Project

General

Profile

« Previous | Next » 

Revision 3227

Added by berkley over 17 years ago

checking in timing print statments

View differences:

src/edu/ucsb/nceas/metacat/DBQuery.java
422 422
       cachedQuerySpec.printSQL(false).equals(qspec.printSQL(false)))
423 423
    { //use the cached resultset if the query was the same as the last
424 424
      MetacatResultSet mrs = (MetacatResultSet)sess.getAttribute("results");
425
      logMetacat.info("Using cached query results.");
425
      logMetacat.warn("#############Using cached query results.");
426 426
      //if the query is the same and the session contains the query
427 427
      //results, return those instead of rerunning the query
428 428
      if(mrs != null)
......
503 503
    try
504 504
    {
505 505
      //cache the query result and the query
506
      logMetacat.info("Caching query and resultset");
506
      logMetacat.warn("#################Caching query and resultset");
507 507
      sess.setAttribute("query", qspec);
508 508
      MetacatResultSet mrs = new MetacatResultSet(resultset.toString());
509 509
      sess.setAttribute("results", mrs);
......
828 828
     if(returnfield_id < 0){
829 829
         logMetacat.warn("Error in getting returnfield id from"
830 830
                                  + "xml_returnfield table");
831
	enterRecords = false;
831
         enterRecords = false;
832 832
     }
833 833

  
834 834
     // get the hashtable containing the docids that already in the
......
850 850
     Hashtable partOfDoclistBackup = new Hashtable();
851 851
     _keys = partOfDoclist.keys();
852 852
     while (_keys.hasMoreElements()){
853
	 Object key = _keys.nextElement();
853
       Object key = _keys.nextElement();
854 854
         partOfDoclistBackup.put(key, partOfDoclist.get(key));
855 855
     }
856 856

  
src/edu/ucsb/nceas/metacat/MetacatResultSet.java
64 64
  public MetacatResultSet(Document d)
65 65
    throws Exception
66 66
  {
67
    log.warn("processing resultset...");
67
    log.warn("#####################processing resultset...");
68 68
    NodeList nl = XPathAPI.selectNodeList(d, "//document");
69 69
    for(int i=0; i<nl.getLength(); i++)
70 70
    { //get each of the document nodes
......
103 103
  public MetacatResultSet(String xmlDoc)
104 104
    throws SAXException, IOException
105 105
  {
106
    double mrsStart = System.currentTimeMillis() / 1000;
107
    log.warn("###############parsing for paged results.....");
106 108
    XMLReader parser = null;
107 109
    String parserName = MetaCatUtil.getOption("saxparser");
108 110
    parser = XMLReaderFactory.createXMLReader(parserName);
109 111
    parser.setContentHandler(this);
110 112
    parser.setErrorHandler(this);
111 113
    parser.parse(new InputSource(new StringReader(xmlDoc)));
114
    double mrsStop = System.currentTimeMillis() / 1000;
115
    log.warn("##############done parsing for paged results.  total time: " + 
116
      (mrsStop - mrsStart) + " seconds");
117
    
112 118
  }
113 119
  
114 120
  /**

Also available in: Unified diff