sourcestats: report asymmetry in statistics log

This commit is contained in:
Miroslav Lichvar 2016-08-10 16:17:51 +02:00
parent 39f34eb674
commit e488371b01
2 changed files with 13 additions and 11 deletions

View file

@ -1485,8 +1485,8 @@ _statistics.log_. An example line (which actually appears as a single line in
the file) from the log file is shown below. the file) from the log file is shown below.
+ +
---- ----
2015-07-22 05:40:50 203.0.113.15 6.261e-03 -3.247e-03 \ 2016-08-10 05:40:50 203.0.113.15 6.261e-03 -3.247e-03 \
2.220e-03 1.874e-06 1.080e-06 7.8e-02 16 0 8 2.220e-03 1.874e-06 1.080e-06 7.8e-02 16 0 8 0.00
---- ----
+ +
The columns are as follows (the quantities in square brackets are the values The columns are as follows (the quantities in square brackets are the values
@ -1521,6 +1521,11 @@ from the example line above):
to be discarded. The number of runs for the data that is being retained is to be discarded. The number of runs for the data that is being retained is
tabulated. Values of approximately half the number of samples are expected. tabulated. Values of approximately half the number of samples are expected.
[8] [8]
. The estimated asymmetry of network jitter on the path to the source which was
used to correct the measured offsets. The asymmetry can be between -0.5 and
0.5. A negative value means the delay of packets sent to the source is
more variable than the delay of packets sent from the source back. [0.00,
i.e. no correction for asymmetry]
+ +
*tracking*::: *tracking*:::
This option logs changes to the estimate of the system's gain or loss rate, and This option logs changes to the estimate of the system's gain or loss rate, and

View file

@ -181,7 +181,7 @@ void
SST_Initialise(void) SST_Initialise(void)
{ {
logfileid = CNF_GetLogStatistics() ? LOG_FileOpen("statistics", logfileid = CNF_GetLogStatistics() ? LOG_FileOpen("statistics",
" Date (UTC) Time IP Address Std dev'n Est offset Offset sd Diff freq Est skew Stress Ns Bs Nr") " Date (UTC) Time IP Address Std dev'n Est offset Offset sd Diff freq Est skew Stress Ns Bs Nr Asym")
: -1; : -1;
} }
@ -552,17 +552,14 @@ SST_DoNewRegression(SST_Stats inst)
inst->asymmetry, inst->asymmetry_run); inst->asymmetry, inst->asymmetry_run);
if (logfileid != -1) { if (logfileid != -1) {
LOG_FileWrite(logfileid, "%s %-15s %10.3e %10.3e %10.3e %10.3e %10.3e %7.1e %3d %3d %3d", LOG_FileWrite(logfileid, "%s %-15s %10.3e %10.3e %10.3e %10.3e %10.3e %7.1e %3d %3d %3d %5.2f",
UTI_TimeToLogForm(inst->offset_time.tv_sec), UTI_TimeToLogForm(inst->offset_time.tv_sec),
inst->ip_addr ? UTI_IPToString(inst->ip_addr) : UTI_RefidToString(inst->refid), inst->ip_addr ? UTI_IPToString(inst->ip_addr) : UTI_RefidToString(inst->refid),
sqrt(inst->variance), sqrt(inst->variance),
inst->estimated_offset, inst->estimated_offset, inst->estimated_offset_sd,
inst->estimated_offset_sd, inst->estimated_frequency, inst->skew, stress,
inst->estimated_frequency, inst->n_samples, best_start, inst->nruns,
inst->skew, inst->asymmetry);
stress,
inst->n_samples,
best_start, nruns);
} }
times_back_start = inst->runs_samples + best_start; times_back_start = inst->runs_samples + best_start;