View | Details | Raw Unified | Return to bug 178862
Collapse All | Expand All

(-)tools/tools/netrate/netreceive/netreceive.c (-3 / +3 lines)
Lines 163-169 Link Here
163
	/* now the parent collects and prints results */
163
	/* now the parent collects and prints results */
164
	c0 = c1 = bc0 = bc1 = 0;
164
	c0 = c1 = bc0 = bc1 = 0;
165
	clock_gettime(CLOCK_REALTIME, &then);
165
	clock_gettime(CLOCK_REALTIME, &then);
166
	fprintf(stderr, "start at %ld.%09ld\n", then.tv_sec, then.tv_nsec);
166
	fprintf(stderr, "start at %jd.%09ld\n", (__intmax_t)then.tv_sec, then.tv_nsec);
167
	while (1) {
167
	while (1) {
168
		int i, nt = nsock * nthreads;
168
		int i, nt = nsock * nthreads;
169
		int64_t dn;
169
		int64_t dn;
Lines 185-192 Link Here
185
		pps = (pps * 1000000000) / (delta.tv_sec*1000000000 + delta.tv_nsec + 1);
185
		pps = (pps * 1000000000) / (delta.tv_sec*1000000000 + delta.tv_nsec + 1);
186
		bps = ((bc0 - bc1) * 8000000000) / (delta.tv_sec*1000000000 + delta.tv_nsec + 1);
186
		bps = ((bc0 - bc1) * 8000000000) / (delta.tv_sec*1000000000 + delta.tv_nsec + 1);
187
		fprintf(stderr, " %9ld pps %8.3f Mbps", (long)pps, .000001*bps);
187
		fprintf(stderr, " %9ld pps %8.3f Mbps", (long)pps, .000001*bps);
188
		fprintf(stderr, " - %d pkts in %ld.%09ld ns\n",
188
		fprintf(stderr, " - %d pkts in %jd.%09ld ns\n",
189
			(int)dn, delta.tv_sec, delta.tv_nsec);
189
			(int)dn, (__intmax_t)delta.tv_sec, delta.tv_nsec);
190
		c1 = c0;
190
		c1 = c0;
191
		bc1 = bc0;
191
		bc1 = bc0;
192
	}
192
	}

Return to bug 178862