summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2015-01-28 14:01:15 +0000
committerBart Polot <bart@net.in.tum.de>2015-01-28 14:01:15 +0000
commitb15a7ac99b5ca7ba24797c27af6ba72e5c981d2a (patch)
treef2b69e9b4341f464816d5dbc50ca7e5b6915acd8 /src
parent5fd8b9746762e85e68fa2ef6aed89a600a25f16c (diff)
- alignment, style
Diffstat (limited to 'src')
-rw-r--r--src/rps/gnunet-service-rps.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index da0661b2d..71a3d55bb 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -750,17 +750,20 @@ est_request_rate()
(req_counter - 1) * sizeof (struct GNUNET_TIME_Relative));
/* Add current delta to beginning */
- request_deltas[0] = GNUNET_TIME_absolute_get_difference (last_request,
- GNUNET_TIME_absolute_get ());
+ request_deltas[0] =
+ GNUNET_TIME_absolute_get_difference (last_request,
+ GNUNET_TIME_absolute_get ());
request_rate = T_relative_avg (request_deltas, req_counter);
/* Compute the duration a round will maximally take */
- max_round_duration = GNUNET_TIME_relative_add (round_interval,
- GNUNET_TIME_relative_divide (round_interval, 2));
+ max_round_duration =
+ GNUNET_TIME_relative_add (round_interval,
+ GNUNET_TIME_relative_divide (round_interval, 2));
/* Set the estimated size the sampler has to have to
* satisfy the current client request rate */
- sampler_size_client_need = max_round_duration.rel_value_us / request_rate.rel_value_us;
+ sampler_size_client_need =
+ max_round_duration.rel_value_us / request_rate.rel_value_us;
/* Resize the sampler */
resize_wrapper ();
@@ -780,7 +783,8 @@ est_request_rate()
* accordingly.
*/
void
-nse_callback (void *cls, struct GNUNET_TIME_Absolute timestamp, double logestimate, double std_dev)
+nse_callback (void *cls, struct GNUNET_TIME_Absolute timestamp,
+ double logestimate, double std_dev)
{
double estimate;
//double scale; // TODO this might go gloabal/config
@@ -791,7 +795,7 @@ nse_callback (void *cls, struct GNUNET_TIME_Absolute timestamp, double logestima
//scale = .01;
estimate = GNUNET_NSE_log_estimate_to_n (logestimate);
// GNUNET_NSE_log_estimate_to_n (logestimate);
- estimate = pow (estimate, 1./3);
+ estimate = pow (estimate, 1.0 / 3);
// TODO add if std_dev is a number
// estimate += (std_dev * scale);
if ( 0 < estimate ) {