*** empty log message ***

svn path=/trunk/boinc/; revision=3936
This commit is contained in:
David Anderson 2004-07-22 15:32:30 +00:00
parent 30fe7e7c4b
commit 6fffce8978
4 changed files with 22 additions and 2 deletions

View File

@ -15597,4 +15597,13 @@ Noaa 21 July 2004
api/
gutil.h
Makefile.graphics
Makefile.graphics
David 22 July 2004
- Another DB performance tweak: add DB_RESULT::update_subset()
to update just those fields needed when send a result
db/
boinc_db.C,h
sched/
sched_send.C

View File

@ -520,6 +520,16 @@ void DB_RESULT::db_print_values(char* buf){
UNESCAPE(stderr_out);
}
int DB_RESULT::update_subset() {
char query[MAX_QUERY_LEN];
sprintf(query,
"update %s set server_state=%d, hostid=%d, userid=%d, sent_time=%d, report_deadline=%d",
server_state, hostid, userid, sent_time, report_deadline
);
return db->do_query(query);
}
void DB_RESULT::db_parse(MYSQL_ROW &r) {
int i=0;
clear();

View File

@ -534,6 +534,7 @@ class DB_RESULT : public DB_BASE, public RESULT {
public:
DB_RESULT();
int get_id();
int update_subset();
void db_print(char*);
void db_print_values(char*);
void db_parse(MYSQL_ROW &row);

View File

@ -642,7 +642,7 @@ static void scan_work_array(
result.userid = reply.user.id;
result.sent_time = time(0);
result.report_deadline = result.sent_time + wu.delay_bound;
result.update();
result.update_subset();
wu_seconds_filled = estimate_cpu_duration(wu, reply.host);
log_messages.printf(