Lines Matching refs:p
407 struct Progress * const p = &data->progress; in progress_calc() local
410 p->timespent = Curl_timediff_us(now, p->start); in progress_calc()
411 p->dl.speed = trspeed(p->dl.cur_size, p->timespent); in progress_calc()
412 p->ul.speed = trspeed(p->ul.cur_size, p->timespent); in progress_calc()
415 if(p->lastshow != now.tv_sec) { in progress_calc()
417 int nowindex = p->speeder_c% CURR_TIME; in progress_calc()
418 p->lastshow = now.tv_sec; in progress_calc()
423 p->speeder[ nowindex ] = p->dl.cur_size + p->ul.cur_size; in progress_calc()
426 p->speeder_time [ nowindex ] = now; in progress_calc()
430 p->speeder_c++; in progress_calc()
436 countindex = ((p->speeder_c >= CURR_TIME) ? CURR_TIME : p->speeder_c) - 1; in progress_calc()
447 checkindex = (p->speeder_c >= CURR_TIME) ? p->speeder_c%CURR_TIME : 0; in progress_calc()
450 span_ms = Curl_timediff(now, p->speeder_time[checkindex]); in progress_calc()
455 amount = p->speeder[nowindex]- p->speeder[checkindex]; in progress_calc()
460 p->current_speed = (curl_off_t) in progress_calc()
465 p->current_speed = amount*CURL_OFF_T_C(1000)/span_ms; in progress_calc()
469 p->current_speed = p->ul.speed + p->dl.speed; in progress_calc()
505 struct Progress *p = &data->progress; in progress_meter() local
515 curl_off_t cur_secs = (curl_off_t)p->timespent/1000000; /* seconds */ in progress_meter()
517 if(!(p->flags & PGRS_HEADERS_OUT)) { in progress_meter()
528 p->flags |= PGRS_HEADERS_OUT; /* headers are shown */ in progress_meter()
532 pgrs_estimates(&p->ul, (p->flags & PGRS_UL_SIZE_KNOWN), &ul_estm); in progress_meter()
533 pgrs_estimates(&p->dl, (p->flags & PGRS_DL_SIZE_KNOWN), &dl_estm); in progress_meter()
544 ((p->flags & PGRS_UL_SIZE_KNOWN) ? p->ul.total_size : p->ul.cur_size) + in progress_meter()
545 ((p->flags & PGRS_DL_SIZE_KNOWN) ? p->dl.total_size : p->dl.cur_size); in progress_meter()
548 total_cur_size = p->dl.cur_size + p->ul.cur_size; in progress_meter()
561 max5data(p->dl.cur_size, max5[0]), /* rcvd size */ in progress_meter()
563 max5data(p->ul.cur_size, max5[1]), /* xfer size */ in progress_meter()
564 max5data(p->dl.speed, max5[3]), /* avrg dl speed */ in progress_meter()
565 max5data(p->ul.speed, max5[4]), /* avrg ul speed */ in progress_meter()
569 max5data(p->current_speed, max5[5]) in progress_meter()