{"id":21546974,"url":"https://github.com/lexxai/goit_python_web_hw_03","last_synced_at":"2025-03-18T01:44:51.110Z","repository":{"id":191219582,"uuid":"684175884","full_name":"lexxai/goit_python_web_hw_03","owner":"lexxai","description":"GoIT, Python WEB, Homework number 03. Threads. Processes.","archived":false,"fork":false,"pushed_at":"2023-09-05T09:12:27.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-24T09:23:10.940Z","etag":null,"topics":["goit","homework","processes","python","threads","web"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lexxai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-28T15:58:22.000Z","updated_at":"2023-09-24T22:16:08.000Z","dependencies_parsed_at":"2023-08-28T21:55:27.919Z","dependency_job_id":"7abcfd08-c7b9-4692-b730-aab017f8cf48","html_url":"https://github.com/lexxai/goit_python_web_hw_03","commit_stats":null,"previous_names":["lexxai/goit_python_web_hw_03"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexxai%2Fgoit_python_web_hw_03","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexxai%2Fgoit_python_web_hw_03/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexxai%2Fgoit_python_web_hw_03/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexxai%2Fgoit_python_web_hw_03/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lexxai","download_url":"https://codeload.github.com/lexxai/goit_python_web_hw_03/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244141582,"owners_count":20404835,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["goit","homework","processes","python","threads","web"],"created_at":"2024-11-24T06:13:48.716Z","updated_at":"2025-03-18T01:44:51.086Z","avatar_url":"https://github.com/lexxai.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# goit_python_web_hw_03\n## Threads\n\n### default run, with up-to 10 threads\n\n```\npython main.py -s picrures        \n2023-08-30 06:19:21,476 [ MainThread ] Duration : 0:00:00.011639 with threads: 10\n```\n\n### default verbose run, with up-to 10 threads\n\n```\npython main.py -s picrures -v\n2023-08-30 06:12:55,744 [ MainThread ] Start search\n2023-08-30 06:12:55,746 [ Th-0 ] `Thread running for sort in picrures/pic1\n2023-08-30 06:12:55,746 [ Th-1 ] `Thread running for sort in picrures/pic1/pip1-1\n2023-08-30 06:12:55,746 [ Th-2 ] `Thread running for sort in picrures/pic2\n2023-08-30 06:12:55,747 [ Th-3 ] `Thread running for sort in picrures/pic2/pic2-1\n2023-08-30 06:12:55,747 [ Th-4 ] `Thread running for sort in picrures/pic2/pic2-1/pic2-1-1\n2023-08-30 06:12:55,747 [ MainThread ] Wait all 5 threads\n2023-08-30 06:12:55,749 [ Th-1 ] `Thread copy picrures/pic1/pip1-1/img02.tif to sort_result/tif/img02.tif\n2023-08-30 06:12:55,751 [ Th-0 ] `Thread copy picrures/pic1/img02.tif to sort_result/tif/img02_c56d1186-2f70-4385-9c82-7597f37da1a8.tif\n2023-08-30 06:12:55,753 [ Th-1 ] `Thread copy picrures/pic1/pip1-1/img03.tif to sort_result/tif/img03.tif\n2023-08-30 06:12:55,754 [ Th-4 ] `Thread copy picrures/pic2/pic2-1/pic2-1-1/root1.tif to sort_result/tif/root1.tif\n2023-08-30 06:12:55,756 [ Th-3 ] `Thread copy picrures/pic2/pic2-1/root1.tif to sort_result/tif/root1_ff472f47-d7a4-4ef8-b7d5-b439880b0c0e.tif\n2023-08-30 06:12:55,754 [ Th-0 ] `Thread copy picrures/pic1/img03.tif to sort_result/tif/img03_7a0d6f1f-f432-48b3-a306-707a0e96805a.tif\n2023-08-30 06:12:55,755 [ Th-1 ] `Thread copy picrures/pic1/pip1-1/img01.tif to sort_result/tif/img01.tif\n2023-08-30 06:12:55,758 [ Th-3 ] `Thread copy picrures/pic2/pic2-1/root0.tif to sort_result/tif/root0.tif\n2023-08-30 06:12:55,759 [ Th-4 ] `Thread copy picrures/pic2/pic2-1/pic2-1-1/root0.tif to sort_result/tif/root0.tif\n2023-08-30 06:12:55,760 [ Th-0 ] `Thread copy picrures/pic1/img01.tif to sort_result/tif/img01_150e9ab3-5c27-4993-b996-155b83134f67.tif\n2023-08-30 06:12:55,761 [ Th-3 ] `Thread copy picrures/pic2/pic2-1/root0.jpg to sort_result/jpg/root0.jpg\n2023-08-30 06:12:55,761 [ Th-4 ] `Thread copy picrures/pic2/pic2-1/pic2-1-1/root0.jpg to sort_result/jpg/root0.jpg\n2023-08-30 06:12:55,763 [ Th-3 ] `Thread copy picrures/pic2/pic2-1/root1.jpg to sort_result/jpg/root1.jpg\n2023-08-30 06:12:55,764 [ Th-4 ] `Thread copy picrures/pic2/pic2-1/pic2-1-1/root1.jpg to sort_result/jpg/root1.jpg\n2023-08-30 06:12:55,764 [ Th-4 ] `Thread copy picrures/pic2/pic2-1/pic2-1-1/root1.png to sort_result/png/root1.png\n2023-08-30 06:12:55,764 [ Th-3 ] `Thread copy picrures/pic2/pic2-1/root1.png to sort_result/png/root1.png\n2023-08-30 06:12:55,765 [ Th-3 ] `Thread copy picrures/pic2/pic2-1/root2.png to sort_result/png/root2.png\n2023-08-30 06:12:55,766 [ Th-4 ] `Thread copy picrures/pic2/pic2-1/pic2-1-1/root2.png to sort_result/png/root2_1f049785-7a52-4c38-a59f-7795d87791f3.png\n2023-08-30 06:12:55,767 [ MainThread ] Finish\n2023-08-30 06:12:55,767 [ MainThread ] Duration : 0:00:00.022533 with threads: 10\n```\n\n\n### verbose run, with up-to 1 threads\n\n```\npython main.py -s picrures -t 1 -v\n2023-08-30 06:18:03,031 [ MainThread ] Start search\n2023-08-30 06:18:03,033 [ Th-0 ] `Thread running for sort in picrures/pic1\n2023-08-30 06:18:03,035 [ MainThread ] Wait all 5 threads\n2023-08-30 06:18:03,035 [ Th-0 ] `Thread copy picrures/pic1/img02.tif to sort_result/tif/img02.tif\n2023-08-30 06:18:03,036 [ Th-0 ] `Thread copy picrures/pic1/img03.tif to sort_result/tif/img03.tif\n2023-08-30 06:18:03,037 [ Th-0 ] `Thread copy picrures/pic1/img01.tif to sort_result/tif/img01.tif\n2023-08-30 06:18:03,038 [ Th-1 ] `Thread running for sort in picrures/pic1/pip1-1\n2023-08-30 06:18:03,038 [ Th-1 ] `Thread copy picrures/pic1/pip1-1/img02.tif to sort_result/tif/img02_deaf16c0-8320-4f00-9e12-2bb2dedef696.tif\n2023-08-30 06:18:03,040 [ Th-1 ] `Thread copy picrures/pic1/pip1-1/img03.tif to sort_result/tif/img03_02b0cdba-f24a-4412-a257-f27434a983ee.tif\n2023-08-30 06:18:03,041 [ Th-1 ] `Thread copy picrures/pic1/pip1-1/img01.tif to sort_result/tif/img01_edabb54b-7bc6-4092-8480-2df1bec64f45.tif\n2023-08-30 06:18:03,042 [ Th-2 ] `Thread running for sort in picrures/pic2\n2023-08-30 06:18:03,042 [ Th-3 ] `Thread running for sort in picrures/pic2/pic2-1\n2023-08-30 06:18:03,043 [ Th-3 ] `Thread copy picrures/pic2/pic2-1/root1.tif to sort_result/tif/root1.tif\n2023-08-30 06:18:03,044 [ Th-3 ] `Thread copy picrures/pic2/pic2-1/root0.tif to sort_result/tif/root0.tif\n2023-08-30 06:18:03,045 [ Th-3 ] `Thread copy picrures/pic2/pic2-1/root0.jpg to sort_result/jpg/root0.jpg\n2023-08-30 06:18:03,045 [ Th-3 ] `Thread copy picrures/pic2/pic2-1/root1.jpg to sort_result/jpg/root1.jpg\n2023-08-30 06:18:03,046 [ Th-3 ] `Thread copy picrures/pic2/pic2-1/root1.png to sort_result/png/root1.png\n2023-08-30 06:18:03,047 [ Th-3 ] `Thread copy picrures/pic2/pic2-1/root2.png to sort_result/png/root2.png\n2023-08-30 06:18:03,047 [ Th-4 ] `Thread running for sort in picrures/pic2/pic2-1/pic2-1-1\n2023-08-30 06:18:03,048 [ Th-4 ] `Thread copy picrures/pic2/pic2-1/pic2-1-1/root1.tif to sort_result/tif/root1_f86fa926-6f83-4c50-b214-6fa51cdd9eb1.tif\n2023-08-30 06:18:03,050 [ Th-4 ] `Thread copy picrures/pic2/pic2-1/pic2-1-1/root0.tif to sort_result/tif/root0_01533f63-b740-416f-99a8-53aac7c5069a.tif\n2023-08-30 06:18:03,051 [ Th-4 ] `Thread copy picrures/pic2/pic2-1/pic2-1-1/root0.jpg to sort_result/jpg/root0_81acdb52-33a5-4e92-af6e-efe957e7e226.jpg\n2023-08-30 06:18:03,052 [ Th-4 ] `Thread copy picrures/pic2/pic2-1/pic2-1-1/root1.jpg to sort_result/jpg/root1_f8a5344b-a0df-4178-bd0e-39b10fce68a3.jpg\n2023-08-30 06:18:03,053 [ Th-4 ] `Thread copy picrures/pic2/pic2-1/pic2-1-1/root1.png to sort_result/png/root1_bccf0b51-0c7a-4f55-a55f-623b8bfa994b.png\n2023-08-30 06:18:03,053 [ Th-4 ] `Thread copy picrures/pic2/pic2-1/pic2-1-1/root2.png to sort_result/png/root2_efe6d272-0c2f-43e9-8cec-7e9803b6bc34.png\n2023-08-30 06:18:03,054 [ MainThread ] Finish\n2023-08-30 06:18:03,054 [ MainThread ] Duration : 0:00:00.022543 with threads: 1\n```\n\n# MULTICORE\n\n##  test factorize by 8 methods with measure time\n```\npython main.py -f\n2023-08-30 23:32:54,127 [ MainThread ] On this system is total cpu: 4\n2023-08-30 23:32:55,203 [ MainThread ] Method [SYNC ONE FUNC]. Duration: 0:00:01.076801\n2023-08-30 23:32:57,340 [ MainThread ] Method [SYNC SPLIT FUNC]. Duration: 0:00:01.134340\n2023-08-30 23:32:59,802 [ MainThread ] Method [ASYNC MP POOL]. Duration: 0:00:01.458097\n2023-08-30 23:33:00,806 [ MainThread ] Threads max: 10\n2023-08-30 23:33:01,933 [ MainThread ] Method [ASYNC THREAD]. Duration: 0:00:01.126956\n2023-08-30 23:33:04,381 [ MainThread ] Method [ASYNC MP PROC PIPE]. Duration: 0:00:01.445985\n2023-08-30 23:33:07,013 [ MainThread ] Method [ASYNC MP PROC QUEUE]. Duration: 0:00:01.621996\n2023-08-30 23:33:09,427 [ MainThread ] Method [ASYNC MP PROC JOIN QUEUE]. Duration: 0:00:01.404368\n2023-08-30 23:33:11,825 [ MainThread ] Method [ASYNC MP FUTURE CONCURENT]. Duration: 0:00:01.389093\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flexxai%2Fgoit_python_web_hw_03","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flexxai%2Fgoit_python_web_hw_03","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flexxai%2Fgoit_python_web_hw_03/lists"}