Skip to content

Commit df7510c

Browse files
author
root
committed
fix 95th percentage calc
1 parent 9f6db2c commit df7510c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rthist.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ double hist_ckp( int transaction )
4848
total = tmp = 0;
4949
line = MAXREC * REC_PER_SEC;
5050
for( i=0; i<(MAXREC * REC_PER_SEC); i++){
51-
total += cur_hist[transaction][i];
51+
total += cur_hist[transaction][i]*i;
5252
}
5353
for( i=(MAXREC * REC_PER_SEC)-1; i >= 0 ; i--){
54-
tmp += cur_hist[transaction][i];
54+
tmp += cur_hist[transaction][i]*i;
5555
total_hist[transaction][i] += cur_hist[transaction][i];
5656
cur_hist[transaction][i] = 0;
5757
if( tmp <= (total*95/100) ){

0 commit comments

Comments
 (0)