MCPcopy Create free account
hub / github.com/apache/trafficserver / finish

Function finish

tools/http_load/http_load.c:2913–2961  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2911}
2912
2913static void
2914finish(struct timeval *nowP)
2915{
2916 float elapsed;
2917 int i;
2918
2919 /* Report statistics. */
2920 elapsed = delta_timeval(&start_at, nowP) / 1000000.0;
2921 (void)printf("%d fetches on %d conns, %d max parallel, %g bytes, in %g seconds\n", fetches_completed, connects_completed,
2922 max_parallel, (float)total_bytes, elapsed);
2923 if (fetches_completed > 0)
2924 (void)printf("%g mean bytes/fetch\n", (float)total_bytes / (float)fetches_completed);
2925 if (elapsed > 0.01) {
2926 (void)printf("%g fetches/sec, %g bytes/sec\n", (float)fetches_completed / elapsed, (float)total_bytes / elapsed);
2927 }
2928 if (connects_completed > 0)
2929 (void)printf("msecs/connect: %g mean, %g max, %g min\n", (float)total_connect_usecs / (float)connects_completed / 1000.0,
2930 (float)max_connect_usecs / 1000.0, (float)min_connect_usecs / 1000.0);
2931 if (responses_completed > 0)
2932 (void)printf("msecs/first-response: %g mean, %g max, %g min\n",
2933 (float)total_response_usecs / (float)responses_completed / 1000.0, (float)max_response_usecs / 1000.0,
2934 (float)min_response_usecs / 1000.0);
2935 if (total_timeouts != 0)
2936 (void)printf("%d timeouts\n", total_timeouts);
2937 if (do_checksum) {
2938 if (total_badchecksums != 0)
2939 (void)printf("%d bad checksums\n", total_badchecksums);
2940 } else {
2941 if (total_badbytes != 0)
2942 (void)printf("%d bad byte counts\n", total_badbytes);
2943 }
2944
2945 (void)printf("HTTP response codes:\n");
2946 for (i = 0; i < 1000; ++i)
2947 if (http_status_counts[i] > 0)
2948 (void)printf(" code %03d -- %d\n", i, http_status_counts[i]);
2949 if (do_verbose) {
2950 (void)printf("Socket slot stats:\n");
2951 for (i = 0; i < max_connections; i++)
2952 if (connections[i].stats.connections > 0)
2953 (void)printf(" slot %04d -- %d connections, %d requests, %d responses\n", i, connections[i].stats.connections,
2954 connections[i].stats.requests, connections[i].stats.responses);
2955 }
2956
2957 tmr_destroy();
2958 if (ssl_ctx != (SSL_CTX *)0)
2959 SSL_CTX_free(ssl_ctx);
2960 exit(0);
2961}
2962
2963static long long
2964delta_timeval(struct timeval *start, struct timeval *finish)

Callers 3

mainFunction · 0.85
start_connectionFunction · 0.85
end_timerFunction · 0.85

Calls 2

delta_timevalFunction · 0.85
tmr_destroyFunction · 0.85

Tested by

no test coverage detected