LoadSample.h

Go to the documentation of this file.
00001 /*
00002  *  BEEN: Benchmarking Environment
00003  *  ==============================
00004  *
00005  *  File author: Branislav Repcek
00006  *
00007  *  GNU Lesser General Public License Version 2.1
00008  *  ---------------------------------------------
00009  *  Copyright (C) 2004-2006 Distributed Systems Research Group,
00010  *  Faculty of Mathematics and Physics, Charles University in Prague
00011  *
00012  *  This library is free software; you can redistribute it and/or
00013  *  modify it under the terms of the GNU Lesser General Public
00014  *  License version 2.1, as published by the Free Software Foundation.
00015  *
00016  *  This library is distributed in the hope that it will be useful,
00017  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019  *  Lesser General Public License for more details.
00020  *
00021  *  You should have received a copy of the GNU Lesser General Public
00022  *  License along with this library; if not, write to the Free Software
00023  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00024  *  MA  02111-1307  USA
00025  */
00026 
00034 #ifndef LOAD_SAMPLE_INCLUDED
00035 #define LOAD_SAMPLE_INCLUDED
00036 
00037 #ifndef _WIN32
00038 #include <stddef.h>
00039 #endif
00040 
00041 #include <vector>
00042 #include <jni.h>
00043 
00044 namespace lm
00045 {
00046 
00049     class LoadSample
00050     {
00051     public:
00053         LoadSample(void);
00054 
00056         LoadSample(unsigned long long time, unsigned long long counter);
00057 
00059         LoadSample(size_t processors, size_t networks, size_t drives);
00060 
00062         void ReallocProcessorData(size_t processors);
00063 
00065         void ReallocNetworkData(size_t networks);
00066 
00068         void ReallocateDriveData(size_t drives);
00069 
00071         std::vector< jshort >   processor_usage;
00072         
00074         std::vector< jint >     network_bytes_in;
00075 
00077         std::vector< jint >     network_bytes_out;
00078 
00080         std::vector< jlong >    disk_write_bytes;
00081 
00083         std::vector< jlong >    disk_read_bytes;
00084 
00086         unsigned long long                memory_free;
00087 
00089         unsigned long long                sample_time;
00090 
00092         unsigned long long                tsc;
00093 
00095         unsigned int                      processor_queue;
00096 
00098         unsigned int                      process_count;
00099     };
00100 } // namespace lm
00101 
00102 #endif

Generated on Tue Dec 19 17:43:49 2006 for Load Monitor for Windows by  doxygen 1.4.7