Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions CPU-bound.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# CPU-bound

Будет генерация 2 монет

### Замер скорости генерации на 1 ядре:

![с1](https://user-images.githubusercontent.com/93836720/145710521-fcbf678a-5549-41e7-a6ec-acf48ab3faae.jpg)

Время 58 секунд

Диспетчер задач:

![с1_д](https://user-images.githubusercontent.com/93836720/145710531-702aaf93-29e0-4486-90cb-e460e63724be.jpg)

### Замер скорости генерации на 2 ядрах:

![с2](https://user-images.githubusercontent.com/93836720/145710711-50a96a4a-609c-42a3-981f-baf829294ce2.jpg)

Время 46 секунд

Диспетчер задач:

![с2_д](https://user-images.githubusercontent.com/93836720/145710717-564f9e94-6b15-49fe-8935-62ea99ba0fbb.jpg)

### Замер скорости генерации на 4 ядрах:

![с3](https://user-images.githubusercontent.com/93836720/145710778-a21af641-ff95-4711-9bf7-0e65bb82187b.jpg)

Время 89 секунд

Диспетчер задач:

![с3_д](https://user-images.githubusercontent.com/93836720/145710786-c524c0ef-3fdd-4fc2-8b39-dce9ace8253e.jpg)

### Замер скорости генерации на 5 ядрах:

![с4](https://user-images.githubusercontent.com/93836720/145710829-15f26f24-004b-4618-a8a4-1cdfab0e38b5.jpg)

Время 94 секунды

Диспетчер задач:

![с4_д](https://user-images.githubusercontent.com/93836720/145710837-d13336ea-f3c8-464b-8b4f-20dbac7cdaad.jpg)

### Замер скорости генерации на 10 ядрах:

![с5](https://user-images.githubusercontent.com/93836720/145710986-f4dca5b6-4747-4efc-8265-367d95ba6b7d.jpg)

Время 57 секунд

Диспетчер задач:

![с5_д](https://user-images.githubusercontent.com/93836720/145710990-a75d72eb-a65d-44b6-81c1-c1f596ecd79b.jpg)

### Замер скорости генерации на 100 ядрах:

![с6](https://user-images.githubusercontent.com/93836720/145711062-9ccd6c33-7591-4666-9375-b36a20ecd5cf.jpg)


Запустить на 100 ядрах нельзя, т.к. максимально возможно 61.

При увеличении ядер от 1 до 4, загруженность на ЦП, памяти, диске растет. А после 4 заметны скачки, загруженность то увеличивается, то уменьшается.
Далее увеличивать бесполезно(после 4), т.к физически больших ядер не существует и значения будут рандомными.
23 changes: 23 additions & 0 deletions CPU-bound.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from hashlib import md5
from random import choice
import concurrent.futures
import time

def get_coin(n):
while True:
s = "".join([choice("0123456789") for i in range(50)])
h = md5(s.encode('utf8')).hexdigest()

if h.endswith("00000"):
return s + ',' + h

def main():
with concurrent.futures.ProcessPoolExecutor(max_workers=100) as executor:
for coin in zip(executor.map(get_coin, range(2))):
print(coin)

if __name__ == '__main__':
start = time.time()
main()
finish = time.time()
print(finish - start)
43 changes: 43 additions & 0 deletions IO-bound.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# IO-bound

### Замер времени синхронной проверки:

![1](https://user-images.githubusercontent.com/93836720/145708722-805536a4-1e0b-4c01-88dc-90c4fd5939e8.jpg)

Время 1494 секунд

Диспетчер задач:

![1_д](https://user-images.githubusercontent.com/93836720/145709809-9e028483-a0ee-4bca-bc00-c31e2eacf402.jpg)

### При 5 воркерах:

![2](https://user-images.githubusercontent.com/93836720/145709469-b897f99e-2621-4562-a3f0-8199f781d75c.jpg)

Время 323 секунды

Диспетчер задач:

![2_д](https://user-images.githubusercontent.com/93836720/145709471-15a2125c-a8c0-4e84-99a3-28b241a1095f.jpg)

### При 10 воркерах:

![3](https://user-images.githubusercontent.com/93836720/145709502-9afe5138-79da-4cf2-9286-b91f9ce6c670.jpg)

Время 185 секунд

Диспетчер задач:

![3_д](https://user-images.githubusercontent.com/93836720/145709511-081cab84-a3aa-444f-9bff-cc6ac4b18c5b.jpg)

### При 10 воркерах:

![4](https://user-images.githubusercontent.com/93836720/145709822-121995eb-753f-4b1c-a25b-e098446ca2a8.jpg)

Время 35 секунд

Диспетчер задач:

![4_д](https://user-images.githubusercontent.com/93836720/145709835-f96575cd-0bc7-46cb-af12-9785cdb6fbc7.jpg)

Можно сделать вывод, что с увеличением количества воркеров, время проверки ссылок становится меньше, загрузка памяти почти не отличается, процессор(цп) в основном тоже одинаков, но бывают моменты когда скачок становится больше
67 changes: 67 additions & 0 deletions IO-bound.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
from urllib.request import Request, urlopen
from urllib.parse import unquote
import concurrent.futures
import urllib.request

links = open('res.txt', encoding='utf8').read().split('\n')

def load_url(url, timeout):
with urllib.request.urlopen(url, timeout=timeout) as conn:
return conn.read()


with concurrent.futures.ThreadPoolExecutor(max_workers=100) as executor:
# Start the load operations and mark each future with its URL
future_to_url = {executor.submit(load_url, url, 5): url for url in links}
for future in concurrent.futures.as_completed(future_to_url):
url = future_to_url[future]
try:
data = future.result()
except Exception as exc:
print('%r generated an exception: %s' % (url, exc))
else:
print('%r page is %d bytes' % (url, len(data)))


#for url in links:
# try:
# request = Request(
# url,
# headers={'User-Agent': 'Mozilla/5.0 (Windows NT 9.0; Win65; x64; rv:97.0) Gecko/20105107 Firefox/92.0'},
# )
# resp = urlopen(request, timeout=5)
# code = resp.code
# print(code)
# resp.close()
# except Exception as e:
# print(url, e)

#from urllib.request import urlopen
#from urllib.parse import unquote
#from bs4 import BeautifulSoup
#from tqdm import tqdm

#url = 'https://ru.wikipedia.org/wiki/%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:%D0%A1%D0%BB%D1%83%D1%87%D0%B0%D0%B9%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0'

#res = open('res.txt', 'w', encoding='utf8')

#for i in tqdm(range(100)):
# html = urlopen(url).read().decode('utf8')
# soup = BeautifulSoup(html, 'html.parser')
# links = soup.find_all('a')


# for l in links:
# href = l.get('href')
# if href and href.startswith('http') and 'wiki' not in href:
# print(href, file=res)

#from urllib.request import urlopen
#from urllib.parse import unquote
#from bs4 import BeautifulSoup

#url = 'https://ru.wikipedia.org/wiki/%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:%D0%A1%D0%BB%D1%83%D1%87%D0%B0%D0%B9%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0'

#for i in range(100):
# s = urlopen(url)
# print(unquote(s.url))
153 changes: 153 additions & 0 deletions res.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
http://www.sbnation.com/nba/2014/6/26/5848224/dwight-powell-charlotte-hornets-nba-draft-results-2014
http://www.nba.com/hornets/hopson-acquired-cavs
http://www.nba.com/cavaliers/releases/powell-signing-140823
http://www.nba.com/celtics/news/pressrelease/boston-celtics-announce-roster-moves
http://www.mavs.com/mavs-acquire-rajon-rondo-dwight-powell-from-celtics/
https://web.archive.org/web/20141219043216/http://www.mavs.com/mavs-acquire-rajon-rondo-dwight-powell-from-celtics/
http://www.nba.com/games/20151103/TORDAL/gameinfo.html
https://web.archive.org/web/20151104025455/http://www.nba.com/games/20151103/TORDAL/gameinfo.html
http://www.nba.com/games/20151107/NOPDAL/gameinfo.html
https://web.archive.org/web/20151109024343/http://www.nba.com/games/20151107/NOPDAL/gameinfo.html
http://www.mavs.com/game-42-mavs-at-spurs/
https://web.archive.org/web/20160207160332/http://www.mavs.com/game-42-mavs-at-spurs/
http://www.mavs.com/the-fast-break-mavs-at-nuggets-2/
http://www.mavs.com/mavericks-sign-forward-center-dwight-powell/
https://gostanford.com/sports/mens-basketball/roster/dwight-powell/7811
https://twitter.com/DwightPowell33
https://instagram.com/dwightpowell/
https://www.tcdb.com/Person.cfm/pid/57043/
https://247sports.com/Player/59314
https://www.basketball-reference.com/players/p/poweldw01.html
https://www.basketball-reference.com/gleague/players/p/poweldw01d.html
https://www.eurobasket.com/player.asp?PlayerID=182829
https://basketball.realgm.com/player/wd/Summary/9346
https://n.rivals.com/content/prospects/42871
https://www.sports-reference.com/cbb/players/dwight-powell-1.html
https://stats.nba.com/player/203939
https://archive.fiba.com/pages/eng/fa/p/rpp//q//pid/124508/_//players.html
https://creativecommons.org/licenses/by-sa/3.0/deed.ru
https://www.openstreetmap.org/?mlat=40.99222&mlon=0.27056&zoom=12
https://www.openstreetmap.org/?mlat=40.99222&mlon=0.27056&zoom=12
https://arensdelledo.es/
https://datos.gob.es/es/catalogo/a02002834-nomenclator-ano-20147
https://www.ine.es/dynt3/inebase/index.htm?padre=525
https://www.worldcat.org/issn/0212-033X
http://www.ine.es/pob_xls/pobmun01.xls
https://www.worldcat.org/issn/0212-033X
http://www.ine.es/pob_xls/pobmun02.xls
https://www.worldcat.org/issn/0212-033X
http://www.ine.es/pob_xls/pobmun04.xls
https://www.worldcat.org/issn/0212-033X
http://www.ine.es/pob_xls/pobmun05.xls
https://www.worldcat.org/issn/0212-033X
http://www.ine.es/pob_xls/pobmun06.xls
https://www.worldcat.org/issn/0212-033X
https://www.worldcat.org/issn/0212-033X
http://www.ine.es/pob_xls/pobmun08.xls
https://www.worldcat.org/issn/0212-033X
http://www.ine.es/pob_xls/pobmun09.xls
https://www.worldcat.org/issn/0212-033X
http://www.ine.es/pob_xls/pobmun10.xls
https://www.worldcat.org/issn/0212-033X
http://www.ine.es/pob_xls/pobmun11.xls
https://www.worldcat.org/issn/0212-033X
http://www.ine.es/pob_xls/pobmun12.xls
https://www.worldcat.org/issn/0212-033X
http://www.ine.es/pob_xls/pobmun13.xls
https://www.worldcat.org/issn/0212-033X
http://www.ine.es/pob_xls/pobmun14.xlsx
https://www.worldcat.org/issn/0212-033X
http://www.ine.es/pob_xls/pobmun15.xlsx
https://www.worldcat.org/issn/0212-033X
http://www.ine.es/dynt3/inebase/index.htm?padre=525
http://www.ine.es/pob_xls/pobmun16.xlsx
https://www.worldcat.org/issn/0212-033X
https://www.boe.es/eli/es/rd/2018/12/14/1458
https://www.worldcat.org/issn/0212-033X
https://www.ine.es/daco/inebase_mensual/enero_2019/cifras_padron.zip
https://www.worldcat.org/issn/0212-033X
https://www.boe.es/eli/es/rd/2019/12/20/743
https://www.worldcat.org/issn/0212-033X
http://www.foro-ciudad.com/teruel/arens-de-lledo/
https://www.enciclopedia.cat/enciclopèdies/gran-enciclopèdia-catalana/EC-GEC-0004975.xml
https://viaf.org/viaf/316734979
https://www.worldcat.org/identities/containsVIAFID/316734979
http://kprf.ru/pravda/issues/2003/87/article-1673/
https://archive.is/20150818173011/http://kprf.ru/pravda/issues/2003/87/article-1673/
https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Info&id=132691
https://www.openstreetmap.org/?mlat=49.250375440379464&mlon=33.52936911764413&zoom=13
https://www.openstreetmap.org/?mlat=49.250375440379464&mlon=33.52936911764413&zoom=13
http://gska2.rada.gov.ua/pls/z7503/A005?rf7571=25608
http://www.tez-rus.net/ViewGood42442.html
http://tomskhistory.lib.tomsk.ru/page.php?id=1167
https://duma.tomsk.ru/content/smi_o_vyborakh_vo_vtoruju_gosudarstvennuju_dumu_v_tomskoj_gubernii
https://web.archive.org/web/20060529081214/http://www.britannica.com/ebi/article-9318376
http://www.isfdb.org/cgi-bin/ea.cgi?149887
http://www.galcit.caltech.edu/space50/program/speakers/SchmittH.html
https://www.webcitation.org/5hYlJ5AiC?url=http://www.galcit.caltech.edu/space50/program/speakers/SchmittH.html
http://universitas.no/news/53501/learned-to-walk-on-the-moon-in-oslo/
https://web.archive.org/web/20090902130904/http://universitas.no/news/53501/learned-to-walk-on-the-moon-in-oslo/
https://historycollection.jsc.nasa.gov/JSCHistoryPortal/history/oral_histories/SchmittHH/schmitthh.htm
http://www.c-span.org/person/?harrisonschmitt
http://www.isfdb.org/cgi-bin/ea.cgi?149887
https://www.vle.lt/straipsnis/harrison-hagan-schmitt
https://www.britannica.com/biography/Harrison-Schmitt
https://nndb.com/people/853/000023784
https://ci.nii.ac.jp/author/DA08293332
https://d-nb.info/gnd/1119560543
http://isni-url.oclc.nl/isni/0000000028663130
https://id.loc.gov/authorities/n85805597
http://aut.nkp.cz/vut2014830324
http://mak.bn.org.pl/cgi-bin/KHW/makwww.exe?BM=01&IM=04&NU=01&WI=A32617227
https://data.bibliotheken.nl/id/thes/p297054627
https://viaf.org/viaf/31002920
https://www.worldcat.org/identities/containsVIAFID/31002920
http://www.chemnet.com/cas/supplier.cgi?exact=dict&terms=7020-80-6
https://dx.doi.org/10.1002%2F047084289X.ra003
http://webbook.nist.gov/cgi/cbook.cgi?ID=7020-80-6
http://webbook.nist.gov/cgi/cbook.cgi?ID=C7020806&Mask=200#Mass-Spec
https://web.archive.org/web/20161204000000/https://www.sports-reference.com/olympics/athletes/lo/yevgeny-lopatin-1.html
http://wsport.free.fr/2008/Janvier/lopatin.htm
https://web.archive.org/web/20120324034545/http://arbatnews.ru/sport1/
http://www.sport-express.ru/newspaper/2005-05-10/8_3/
http://vivovoco.astronet.ru/VV/1000/C_NIKITA.HTM#V
http://www.allpravo.ru/library/doc313p0/instrum3064/item3103.html
http://www.mosgu.ru/nauchnaya/publications/2007/abstract/Eneev_AK/
http://magazines.russ.ru/oz/2003/2/afan.html
http://www.kaznachey.com/doc/a10BFWHM0SQ/
http://www.businesspravo.ru/Docum/DocumShow_DocumID_37661.html
http://ussr.consultant.ru/doc2791.html
https://www.znak.com/2017-10-27/kak_sverdlovskaya_oblast_gotovitsya_k_vvodu_prisyazhnyh_v_rayonnyh_sudah
https://web.archive.org/web/20180509013708/https://www.znak.com/2017-10-27/kak_sverdlovskaya_oblast_gotovitsya_k_vvodu_prisyazhnyh_v_rayonnyh_sudah
http://www.pravo.ru/process/view/24686/
http://www.neps.ru/media/files/library/file79.pdf
http://www.zashita-zk.org/stats/1444897212.html
http://www.rbc.ru/society/25/02/2016/56ceaecc9a794725ec92186c
http://www.vedomosti.ru/newsline/top/politics/news/2016/02/16/629815-putin-sud-prisyazhnih
https://web.archive.org/web/20160217092334/http://www.vedomosti.ru/newsline/top/politics/news/2016/02/16/629815-putin-sud-prisyazhnih
http://www.consultant.ru/document/cons_doc_LAW_34481/28202fb26d1587dcb5f6159494865db1106e2bcf/
https://rg.ru/2019/01/09/reg-cfo/sudy-prisiazhnyh-poiavilis-v-55-regionah-rossii.html
https://mbk-news.appspot.com/suzhet/prigovor-ne-okonchatelny/
http://elib.shpl.ru/ru/nodes/24180-timofeev-n-p-sud-prisyazhnyh-v-rossii-sudebnye-ocherki-m-1881#page/1/mode/grid/zoom/1
http://wasiliev.pro/wp-content/uploads/2017/12/Book-Wasiliev-Baranovskiy-2017-The-jury-trial-last-chance-of-Themis.pdf
http://www.jurytrial.ru/item/172
http://jurytrial.ru/forum/post/19
http://jurytrial.ru
https://www.openstreetmap.org/?mlat=3.22028&mlon=-76.31389&zoom=12
https://www.openstreetmap.org/?mlat=3.22028&mlon=-76.31389&zoom=12
http://www.padilla-cauca.gov.co
http://www.padilla-cauca.gov.co/tema/municipio
https://www.geonames.org/3673407/padilla.html
https://www.dane.gov.co/files/investigaciones/poblacion/proyepobla06_20/ProyeccionMunicipios2005_2020.xls
http://www.dane.gov.co/files/censo2005/perfiles/cauca/padilla.pdf
http://www.antena3.com/series/vis-a-vis/
https://www.imdb.com/title/tt4524056/
https://www.fernsehserien.de/vis-a-vis
http://www.teinteresa.es/tele/estreno-Vis-espectadores-regreso-avecina_0_1343265810.html
https://elpais.com/cultura/2017/07/06/television/1499336342_371675.html
https://www.lacosacine.com/tv/vis-a-vis-confirma-su-spin-off/
https://www.facebook.com/a3visavis
https://twitter.com/visavisoficial
https://www.allocine.fr/series/ficheserie_gen_cserie=18960.html
https://www.filmaffinity.com/en/film441483.html
https://www.imdb.com/title/tt4524056
Binary file added скриншоты/1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added скриншоты/1_д.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added скриншоты/2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added скриншоты/2_д.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added скриншоты/3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added скриншоты/3_д.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added скриншоты/4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added скриншоты/4_д.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added скриншоты/с1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added скриншоты/с1_д.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added скриншоты/с2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added скриншоты/с2_д.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added скриншоты/с3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added скриншоты/с3_д.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added скриншоты/с4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added скриншоты/с4_д.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added скриншоты/с5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added скриншоты/с5_д.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added скриншоты/с6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.