Comments (3)
Hi Ofir -- How did you conclude that the values in current_tcp_info
changed unexpectedly?
In the function reinit_sending_time
where the issue was opened, client_.tcp_info()
will not get updated, so there will be no difference to grab a (const) reference or make a copy. To verify this, feel free to print out curr_tcp_info
three times in a row anywhere in that function but make sure you are printing for the same client_
.
Additionally, before every video chunk is served to a client, the tcp_info of the client will be updated with new values from the kernel, so when Line 135 is executed again next time, the tcp_info will probably have different values.
from puffer.
I know it sound strange but this is exactly what I tried:
If I'm printing right after declaration, 3 times in a row, I'm getting good results (I've printed all its properties - delivery_rate, cwnd, in_flight, min_rtt, rtt):
0,sdsdfsdf: Firefox on Linux, 127.0.0.1:44938
0,sdsdfsdf: connection initialized
0,sdsdfsdf: channel nbc, audio 0 32k
936228571 11 0 17 19
936228571 11 0 17 19
936228571 11 0 17 19
But if I'm printing right after declaration and after the if-block (line 176), curr_tcp_info
changed:
For referenced curr_tcp_info
(original code):
0,sdsdfsdf: Firefox on Linux, 127.0.0.1:44774
0,sdsdfsdf: connection initialized
0,sdsdfsdf: channel nbc, audio 0 32k
1129931034 11 0 18 19
1129931034 616078304 21854 18 19
0,sdsdfsdf: channel nbc, video 0 1920x1080-22 0.987653
4365533333 18 0 5 570
93862818819104 603531808 21854 603531808 21854
0,sdsdfsdf: channel nbc, video 180180 1920x1080-24 0.987683
But For copied curr_tcp_info
:
0,sdsdfsdf: Firefox on Linux, 127.0.0.1:44510
0,sdsdfsdf: connection initialized
0,sdsdfsdf: channel nbc, audio 0 32k
1057032258 12 0 24 25
1057032258 12 0 24 25
0,sdsdfsdf: channel nbc, video 0 1920x1080-22 0.987653
4092687500 10 0 12 113
4092687500 10 0 12 113
0,sdsdfsdf: channel nbc, video 180180 1920x1080-24 0.987683
from puffer.
Sorry for the delay! I finally got a chance to test it and decided to remove the ampersand for the following reason.
With the ampersand, capturing client_.tcp_info().value();
by reference might lead to undefined behavior depending on the compiler. I am not sure if the lifetime of the returned optional
object will be guaranteed to extend, so I decided to play it safe and capture by value instead, as you suggested.
Thanks a lot for catching that!
from puffer.
Related Issues (17)
- Can changing channel be instant(ish) ? HOT 1
- Do you want reports on performance and issues from us on the client side? HOT 1
- Puffer website is not available over IPv6 HOT 1
- https://puffer.stanford.edu/monitoring/ not available HOT 1
- Add channel 44 KBCW HOT 1
- needs help while reproducing the work. HOT 1
- Do you have any technical documentation or comments to go with this puffer code? HOT 3
- Incorrect access to tcp_info in puffer_ttp.cc HOT 4
- real time feeds question HOT 1
- make -j CXXFLAGS='-DNONSECURE' does not work HOT 6
- Add KLCS PBS and KLCS Kids channels HOT 1
- Regenerate nsdi plot HOT 1
- What is the PING & PONG WSFRAME designed for? HOT 2
- [Question] can puffer port and test in qualcomm® snapdragon™ - automotive development platform? HOT 1
- Support wide layout in web frontend
- Fugu training code? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puffer.