We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f6db2c commit df7510cCopy full SHA for df7510c
src/rthist.c
@@ -48,10 +48,10 @@ double hist_ckp( int transaction )
48
total = tmp = 0;
49
line = MAXREC * REC_PER_SEC;
50
for( i=0; i<(MAXREC * REC_PER_SEC); i++){
51
- total += cur_hist[transaction][i];
+ total += cur_hist[transaction][i]*i;
52
}
53
for( i=(MAXREC * REC_PER_SEC)-1; i >= 0 ; i--){
54
- tmp += cur_hist[transaction][i];
+ tmp += cur_hist[transaction][i]*i;
55
total_hist[transaction][i] += cur_hist[transaction][i];
56
cur_hist[transaction][i] = 0;
57
if( tmp <= (total*95/100) ){
0 commit comments