mirror of https://github.com/BOINC/boinc.git
- client: write daily net history on shutdown
- client: remove extraneous calls to calShutdown() in ATIs available-RAM code. svn path=/trunk/boinc/; revision=21304
This commit is contained in:
parent
ef0019d8c3
commit
9f9d98fff1
|
@ -3208,3 +3208,17 @@ David 26 Apr 2010
|
|||
boinc_db.h
|
||||
sched/
|
||||
credit.cpp
|
||||
|
||||
David 27 Apr 2010
|
||||
- client: write daily net history on shutdown
|
||||
- client: remove extraneous calls to calShutdown()
|
||||
in ATIs available-RAM code.
|
||||
|
||||
client
|
||||
coproc_detect.cpp
|
||||
net_status.cpp,h
|
||||
main.cpp
|
||||
cs_scheduler.cpp
|
||||
html/project.sample/
|
||||
project_specific_prefs.inc
|
||||
|
||||
|
|
|
@ -875,7 +875,6 @@ void COPROC_ATI::get_available_ram() {
|
|||
"[coproc] calDeviceOpen(%d) returned %d", devnum, retval
|
||||
);
|
||||
}
|
||||
(*__calShutdown)();
|
||||
continue;
|
||||
}
|
||||
retval = (*__calDeviceGetStatus)(&st, dev);
|
||||
|
@ -887,7 +886,6 @@ void COPROC_ATI::get_available_ram() {
|
|||
);
|
||||
}
|
||||
(*__calDeviceClose)(dev);
|
||||
(*__calShutdown)();
|
||||
continue;
|
||||
}
|
||||
available_ram[i] = st.availLocalRAM*MEGA;
|
||||
|
|
|
@ -207,7 +207,9 @@ int CLIENT_STATE::make_scheduler_request(PROJECT* p) {
|
|||
time_stats.write(mf, true);
|
||||
net_stats.write(mf);
|
||||
if (global_prefs.daily_xfer_period_days) {
|
||||
daily_xfer_history.write(mf, global_prefs.daily_xfer_period_days);
|
||||
daily_xfer_history.write_scheduler_request(
|
||||
mf, global_prefs.daily_xfer_period_days
|
||||
);
|
||||
}
|
||||
|
||||
// update hardware info, and write host info
|
||||
|
|
|
@ -386,6 +386,7 @@ int finalize() {
|
|||
if (finalized) return 0;
|
||||
finalized = true;
|
||||
gstate.quit_activities();
|
||||
daily_xfer_history.write_state();
|
||||
|
||||
#ifdef _WIN32
|
||||
shutdown_idle_monitor();
|
||||
|
|
|
@ -351,8 +351,13 @@ void DAILY_XFER_HISTORY::poll() {
|
|||
if (!dirty) return;
|
||||
if (gstate.now - last_time < DAILY_XFER_HISTORY_PERIOD) return;
|
||||
last_time = gstate.now;
|
||||
write_state();
|
||||
}
|
||||
|
||||
|
||||
void DAILY_XFER_HISTORY::write_state() {
|
||||
FILE* f = fopen(TEMP_FILE_NAME, "w");
|
||||
if (!f) return;
|
||||
fprintf(f, "<daily_xfers>\n");
|
||||
for (unsigned int i=0; i<daily_xfers.size(); i++) {
|
||||
DAILY_XFER& dx = daily_xfers[i];
|
||||
|
@ -379,7 +384,7 @@ void DAILY_XFER_HISTORY::totals(int ndays, double& up, double& down) {
|
|||
}
|
||||
}
|
||||
|
||||
void DAILY_XFER_HISTORY::write(MIOFILE& mf, int ndays) {
|
||||
void DAILY_XFER_HISTORY::write_scheduler_request(MIOFILE& mf, int ndays) {
|
||||
double up, down;
|
||||
totals(ndays, up, down);
|
||||
mf.printf(
|
||||
|
|
|
@ -132,7 +132,8 @@ struct DAILY_XFER_HISTORY {
|
|||
void init();
|
||||
void poll();
|
||||
void totals(int ndays, double& up, double& down);
|
||||
void write(MIOFILE&, int ndays);
|
||||
void write_state();
|
||||
void write_scheduler_request(MIOFILE&, int ndays);
|
||||
DAILY_XFER_HISTORY() {
|
||||
dirty = false;
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
define ('COLOR_PREFS', false);
|
||||
define ('GFX_CPU_PREFS', true);
|
||||
define ('APP_SELECT_PREFS', false);
|
||||
define ('APP_SELECT_PREFS', true);
|
||||
$project_has_beta = false;
|
||||
|
||||
// Project-specific prefs are represented in three ways:
|
||||
|
|
Loading…
Reference in New Issue