Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv9333
Modified Files:
System.cpp System.h
Log Message:
Host configuration and settings can be stored in results' output directory.
Index: System.cpp
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System/System.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** System.cpp 6 Jun 2007 15:59:16 -0000 1.17
--- System.cpp 20 Aug 2007 17:07:43 -0000 1.18
***************
*** 188,196 ****
}
! int System::storeConfiguration(void)
{
std::string data = Config()->str();
! return(fileWrite(configurationFile, data));
}
--- 188,230 ----
}
!
! int System::storeConfiguration(std::string fn)
{
std::string data = Config()->str();
! if (fn=="")
! fn=configurationFile;
!
! return(fileWrite(fn, data));
! }
!
! int System::storeHost(std::string fn)
! {
! std::string data = "<host>\n <arch id=\"";
! data+=arch();
! data+="\">\n";
! data+=" <host-id id=\"";
! data+=hostid();
! data+="\">\n";
! data+=" <hostname=\"";
! data+=hostname();
! data+="\">\n";
! data+=" <os name=\"";
! data+=os();
! data+="\" version=\"";
! data+=os_version();
! data+="\"/>";
! data+=" <processors name=\"";
! data+=processor_name();
! data+="\" mhz=\"";
! data+=processor_mhz();
! data+="\" cache=\"";
! data+=processor_cache();
! data+="\" number=\"";
! data+=processor_number();
! data+="\"/>\n";
! data+="</host>\n";
!
! return(fileWrite(fn, data));
}
Index: System.h
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System/System.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** System.h 28 May 2007 18:06:26 -0000 1.10
--- System.h 20 Aug 2007 17:07:43 -0000 1.11
***************
*** 96,100 ****
class Config *Config(void);
! virtual int storeConfiguration(void);
virtual std::string env(std::string _var);
--- 96,101 ----
class Config *Config(void);
! virtual int storeConfiguration(std::string fn = "");
! virtual int storeHost(std::string fn);
virtual std::string env(std::string _var);
|