-
Notifications
You must be signed in to change notification settings - Fork 454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Experiment 1.1 #5586
Experiment 1.1 #5586
Conversation
👉 View analysis in DeepCode’s Dashboard | Configure the bot |
retest this please |
@drew2a looks like there was a zombie Tribler process running on the Windows 64-bit testing machine. I killed it and the GUI tests seems to pass now 👍 |
@devos50 thanks :) |
f9ae4c9
to
7012175
Compare
Nice progress! It appears that many of the gossiped information in the A promising approach is to utilise the BEP33 protocol that has libtorrent DHT peers maintain two bloomfilters (one for the leeches and one for the seeders) to estimate the size/health of a swarm. Unfortunately, this protocol is not natively supported by libtorrent and adding support requires some modifications to the upstream code. I implemented the protocol in native libtorrent a while ago, which is further discussed here. I also performed a few DAS5 experiments and some graphs can be found here. Using BEP33 resulted in less dead torrents, at the cost of additional bandwidth requirements. Maybe you can consider this when designing follow-up experiments :) |
Also, I'm not entirely sure if we want to add this code to our main repository. Scripts that are exclusively used during experiments usually are usually included in our Gumby experiment framework. |
Yes, this definitely should go into the Gumby repo. You can then also get rid of ~90% of the boilerplate code in this PR then. |
But then we would not have seen this PR, which is easily the most beautiful, disciplined, clean and formally written thing to ever appear on Tribler "Pull Requests" page 👍 👼 This tells something about our average code quality and priorities, BTW 🤣 |
We can make standardized PR message templates, I've done this for IPv8 as well. The issue is that developers are usually too lazy to fill out an entire questionnaire about some trivial PR. I'd say you need a well-thought-out selection of different PR templates that fit the different types of contributions if you want to maintain any form of standard.
How does a PR message reflect code quality? I can see how it would say something about our contribution pipeline's quality assurance though. Writing a proper PR message shows respect to your reviewer's time and I appreciate that as well. |
I mean, look at the code quality. That's what I was talking about, not just PR message. |
@ichorid I might be misunderstanding your use of the "🤣" emoji then. I'd say the code quality is pretty good if you can launch a clean-slate Tribler instance like this with custom Community logic hooked in. |
@qstokkink , my ":rofl:" emojis meant literally the following: " @drew2a 's code quality and presentation is much higher than what we are typically used to in Tribler, and that becomes especially funny if you consider that this is just some throw-away experimental PR" |
Thanks for the clarification, that is quite the insult. But, I'm not seeing it. Could you give some examples in this PR of what you consider better than existing code? In order to not make any 3rd party casualties, I'll put my own ass on the line: you can use my code of https://github.com/Tribler/tribler/pull/5581/files for reference. Regarding the code of this PR, I see shadowing of class-space attribute names being shadowed by instance fields (e.g. class A:
some_field = None
def __init__(self, some_field):
self.some_field = some_field
class B:
some_field = None
def __init__(self, some_field):
self.some_fie1d = some_field
a = A(1)
b = B(1)
print(a.some_field) # prints 1
print(b.some_field) # prints None
a.some_field = 2
b.some_field = 2
print(a.some_field) # prints 2
print(b.some_field) # prints 2 |
@qstokkink , now I don't see an insult... Could you please clarify? Now to the code quality. I would definitely consider the following features a complete overkill for a one-shot experiment:
Nonetheless @drew2a added the stuff. Which definitely tells us about how pedantic the author is, be it for good or bad... |
Regarding the class variable shadowing, I think it is unacceptable, except for extreme cases like compatiblity stuff, testing, etc. Class variables are just that - class variables. @qstokkink , your example cleverly exploits This only shows that, while being a very disciplined programmer, @drew2a is not too familiar with Python development quirks... That's why @qstokkink 's input is especially valuable in reviewing @drew2a 's code 😉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I quite like @drew2a coding style. I approve the PR and I'll adopt some of the styles in my future PR.
@ichorid @qstokkink gens, thank you for your comments. |
One proposal: let's add this directory to the root directory in the repo. Also, don't forget to rebase this PR 👍 |
That's just really unnecessary. You know, it's actually possible to compliment a colleague's coding style, without insulting the rest of the team. |
@qstokkink thank you for your proposals. I've implement them for avoiding potential "shadowing issues". I'm still not "pythonic" enough, so feel free to correct me. @devos50 code has been moved to the root. |
@qstokkink , @egbertbouman , OK, dear colleagues. I officially apologize for insulting your coding style. I did not meant anyone personally. Probably, my judgement was based on too much student code refactoring over the last couple of years... |
@drew2a looking good 👍 If at all possible, I will try to prevent you from making the mistakes I have in the past (hopefully with some fun code snippets and not links to API docs 😛). @ichorid no worries, I will assume that was unhappy wording of good intentions. Thank you for specifying exactly what you meant with quality coding. Though it is an important end result, we cannot improve our project on sentiment and I had to press you on what components you were unhappy with exactly. |
Add argv support Add timeout Fixes based on PR Add cosmetic changes Delete trailing whitespace Fix potential shadowing issue Move to root directory Add PYTHONPATH export example
6934615
to
61d605f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
retest this please |
4 similar comments
retest this please |
retest this please |
retest this please |
retest this please |
Kudos, SonarCloud Quality Gate passed!
|
Popularity Community Experiment
Issue: #5580
Raw result data from the last build: result.csv
Build-to-build visualisation: plot in Jenkins
Jenkins job is scheduled to run every day at 8:00.
initial_filling.py
initial_filling.py
Description
This script calculate velocity of torrents list filling.
Given: the real network.
Action:
N
seconds check how long torrent's list areResult will be stored in a csv file.
Example:
Here
alive
means have at least1
seeder.Experiment results
Velocity for the first
10
minutesTotal:
572
Alive:
40
Velocity for the first
30
minutesTotal:
2817
Alive:
145
Only alive:
![image](https://user-images.githubusercontent.com/13798583/94398799-e54d2280-016e-11eb-8d5e-0e68f37a90e2.png)
Usage
Where:
check_interval_in_sec
means how frequently we check the torrent listtimeout_in_sec
means a time that the experiment will lastoutput_file.csv
means a path and a result file nameExample