src/server/server.c
static void print_statistics( const struct statistics * restrict stats ){
	
	assert( stats != NULL );

	printf( "Server statistics:\n"
		"------------------\n"
		"Active threads = %d\n"
		"Hear connections = %d\n"
		"Say connections = %d\n"
		"Twits currently stored = %d\n"
		"Total twits arrived = %d\n"
		"Total twits delivered = %d\n"
		"Average incoming rate = %f\n"
		"Average outcoming rate = %f\n"
		"\n\n",
		stats->stats_threadsNum,
		stats->stats_hearersNum,
		stats->stats_sayersNum,
		stats->stats_storedTwitsNum,
		stats->stats_arrivedTwitsNum,
		stats->stats_deliveredTwitsNum,
		stats->stats_averageTwitsIncomingRate,
		stats->stats_averageTwitsOutcomingRate
	);
	fflush( stdout );

	return ;
}
// Print the statistics to stdout. This function assumes that the structure is locked.
Print the statistics to stdout. This function assumes that the structure is locked.
Print the statistics to stdout . This function assumes that the structure is locked .
static void print_statistics( const struct statistics * restrict stats ){
	assert( stats != NULL );
	printf( "Server statistics:\n"
		"------------------\n"
		"Active threads = %d\n"
		"Hear connections = %d\n"
		"Say connections = %d\n"
		"Twits currently stored = %d\n"
		"Total twits arrived = %d\n"
		"Total twits delivered = %d\n"
		"Average incoming rate = %f\n"
		"Average outcoming rate = %f\n"
		"\n\n",
		stats->stats_threadsNum,
		stats->stats_hearersNum,
		stats->stats_sayersNum,
		stats->stats_storedTwitsNum,
		stats->stats_arrivedTwitsNum,
		stats->stats_deliveredTwitsNum,
		stats->stats_averageTwitsIncomingRate,
		stats->stats_averageTwitsOutcomingRate
	);
	fflush( stdout );
	return ;
}
static void print_statistics ( const struct statistics * restrict stats ) { assert ( stats != NULL ) ; printf ( " \n " " \n " " \n " " \n " " \n " " \n " " \n " " \n " " \n " " \n " " \n \n " , stats -> stats_threadsNum , stats -> stats_hearersNum , stats -> stats_sayersNum , stats -> stats_storedTwitsNum , stats -> stats_arrivedTwitsNum , stats -> stats_deliveredTwitsNum , stats -> stats_averageTwitsIncomingRate , stats -> stats_averageTwitsOutcomingRate ) ; fflush ( stdout ) ; return ; }
Print the statistics to stdout.
Print the statistics to stdout .