Lines Matching refs:s
65 for idx, s in enumerate(r.stats):
66 self.check_stat(idx, s, r, dl_size=30, ul_size=0)
82 for idx, s in enumerate(r.stats):
83 self.check_stat(idx, s, r, dl_size=30, ul_size=0)
102 for idx, s in enumerate(r.stats):
103 self.check_stat(idx, s, r, dl_size=fsize, ul_size=fsize)
114 for idx, s in enumerate(r.stats):
115 self.check_stat(idx, s, r, dl_size=30, ul_size=0)
117 def check_stat(self, idx, s, r, dl_size=None, ul_size=None): argument
118 self.check_stat_times(s, idx)
120 self.check_stat_positive(s, idx, 'size_request')
122 self.check_stat_positive(s, idx, 'size_header')
124 assert s['size_upload'] == ul_size, f'stat #{idx}\n{r.dump_logs()}' # the file we sent
125 assert s['size_request'] >= s['size_upload'], \
128 … assert s['size_download'] == dl_size, f'stat #{idx}\n{r.dump_logs()}' # the file we received
130 def check_stat_positive(self, s, idx, key): argument
131 assert key in s, f'stat #{idx} "{key}" missing: {s}'
132 assert s[key] > 0, f'stat #{idx} "{key}" not positive: {s}'
134 def check_stat_zero(self, s, key): argument
135 assert key in s, f'stat "{key}" missing: {s}'
136 assert s[key] == 0, f'stat "{key}" not zero: {s}'
138 def check_stat_times(self, s, idx): argument
140 url = s['url_effective']
148 if s['num_connects'] > 0:
152 if s['num_redirects'] > 0:
157 self.check_stat_zero(s, key)
159 self.check_stat_positive(s, idx, key)
162 assert s[key] < s['time_pretransfer'], f'time "{key}" larger than' \
165 assert s['time_pretransfer'] <= s['time_starttransfer'], f'"time_pretransfer" '\
168 assert s['time_starttransfer'] <= s['time_total'], f'"time_starttransfer" '\