mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=3936
This commit is contained in:
parent
30fe7e7c4b
commit
6fffce8978
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue