2007-11-30 04:22:42 +01:00
// PerformanceGraph.java
// (C) 2007 by Michael Peter Christen; mc@yacy.net, Frankfurt a. M., Germany
// first published 30.11.2007 on http://yacy.net
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
// $LastChangedRevision: 1986 $
// $LastChangedBy: orbiter $
//
// LICENSE
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2008-08-25 20:11:47 +02:00
import de.anomic.http.httpRequestHeader ;
2007-12-04 21:19:13 +01:00
import de.anomic.plasma.plasmaProfiling ;
2008-04-08 16:44:39 +02:00
import de.anomic.plasma.plasmaSwitchboard ;
2007-11-30 04:22:42 +01:00
import de.anomic.server.serverObjects ;
import de.anomic.server.serverSwitch ;
import de.anomic.ymage.ymageMatrix ;
public class PerformanceGraph {
2008-08-25 20:11:47 +02:00
public static ymageMatrix respond ( final httpRequestHeader header , serverObjects post , final serverSwitch < ? > env ) {
2008-08-02 14:12:04 +02:00
final plasmaSwitchboard sb = ( plasmaSwitchboard ) env ;
2007-11-30 04:22:42 +01:00
2007-12-03 03:35:28 +01:00
if ( post = = null ) post = new serverObjects ( ) ;
2007-11-30 04:22:42 +01:00
2008-08-02 14:12:04 +02:00
final int width = post . getInt ( " width " , 660 ) ;
final int height = post . getInt ( " height " , 240 ) ;
2007-11-30 04:22:42 +01:00
2009-03-16 17:24:53 +01:00
return plasmaProfiling . performanceGraph ( width , height , sb . webIndex . metadata ( ) . size ( ) + " URLS / " + sb . webIndex . index ( ) . getBackendSize ( ) + " WORDS IN COLLECTIONS / " + sb . webIndex . index ( ) . getBufferSize ( ) + " WORDS IN CACHE " ) ;
2007-11-30 04:22:42 +01:00
}
}