Tuesday, 15 September 2015

c - clock_gettime CLOCK_REALTIME unexpected result -


I see how much time I'm trying to process a pipeline data, I have to take the results of the store < / P> clock_gettime (CLOCK_REALTIME, & amp; Start);

When I add data items to my input buffer.

Then I used that time when I calculated how long it took to take action on items too.

It seems for the first few items to work properly, but then I get crazy results after that.

I went to work out while using the function

  Double xelapsed (struct timespec one, struct timespec b) {return (a.tv_sec - b.tv_sec) * 1,000,000.0 + (a.tv_nsec - b.tv_nsec) / 1000.0; }  

This is what I end:

  bash -4.1 $ ./pipe Latency: 1.447000 μs latency: 81.54 9000 Μs Latency: 104.253000 μs Latency: 112.497000 μs Latency: 121.307000 μs Latency: 128.99 3,000 μs Latency: 136.334000 μs Latency: 147.910000 μs Latency: 147.910000 μs Latency: 152.242000 μs Latency: 156.492000 μs Latency: 160.72 9 000 μs Latency: 164.7 9 3,000 μs latency: 168.782000 μs latency: 172.756000 μs latency: 176.720000 Μs latency: 175.370000 μs latency: 184.937000 μs latency: 183.424000 μs latency: 187.353000 μs Retention: 196.870000 μs Latency: 200.874000 μs Latency: 205.332000 μs Latency: 20 9.353000 μs Latency: 213.677000 μs Latency: 218.040000 μs Latency: 222.435000 μs Latency: 226.559000 μs Latency: 230.897000 μs Waiting Period: 235.170000 μs Waiting Period: 239.481000 μs Waiting Period: 243.829000 μs Waiting Period: 247.709000 μs Waiting Period: 251.974000 μs Waiting Period: 256.338000 μs Waiting Period: 260.363000 μs Waiting Period: 264.832000 μ Latency: 26,92,000 μs Latency: 273.171000 μs Latency: 277.525000 μs Latency: 281.701000 μs Latency: LET 285.674000 μs Ics: 290.187000 μs Latency: 294.239000 μs Latency: 298.504000 μs Latency: 302.604000 μs Latency: 307.095000 μs Latency: 315.343000 μs Latency: 318.812000 μs Latency: 327.149000 μs Latency: 331.065000 μs Latency: 335.114000 μs Latency: 33 9 632000 μs Latency: 342.989000 μs Latency: 344.433000 μs Latency: 348.567000 μs Latency: 352.376000 μs Latency: 356.801000 μs Latency: 360.752000 μs Latency: 364.337000 μs Waiting Period: 368.808000 μs Waiting Period: 372.082000 μs Waiting Period: 376.500000 μs Waiting Period: 380.283000 μs Waiting Period : 384.611000 μs Raticsha period: 388.134000 μs latency: 392.083000 μs latency: 396.484000 μs latency: 400.428000 μs latency: 1426625359409111.000000 μs latency: 1426625359409117.250000 μs latency: 1426625359409123.250000 μs latency: 1426625359409128.750000 μs latency: 1426625359409134.500000 μs latency: 1426625359409140.500000 μs wait duration: 1426625359409146.000000 μs latency: 1426625359409151.750000 μs latency: 1426625359409157.500000 μs latency: 1426625359409163.000000 μs latency: 1426625359409168.500000 μs Prtic Period: 1426625359409174.250000 μs Waiting Period: 1426625359409180.000000 μs Waiting Period: 1426625359409185.500000 μs Waiting Period: 1426625359409191.000000 μs Waiting Period: 1426625359409196.750000 μs Latency: 1426625359409202.250000 μs  


No comments:

Post a Comment