{"id":21043689,"url":"https://github.com/streamlined2/data-processor","last_synced_at":"2025-06-27T03:35:39.461Z","repository":{"id":232874729,"uuid":"781509121","full_name":"streamlined2/data-processor","owner":"streamlined2","description":"Parse JSON documents, validate entities, collect statistical information, format, and output as XML file","archived":false,"fork":false,"pushed_at":"2024-08-21T14:50:33.000Z","size":150,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-20T17:25:08.285Z","etag":null,"topics":["jackson","jackson-stream","java-17","junit5","maven","xml"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/streamlined2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-03T14:15:27.000Z","updated_at":"2024-08-21T14:50:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"573dc27c-6d2c-4a02-837b-c5a68f212c60","html_url":"https://github.com/streamlined2/data-processor","commit_stats":null,"previous_names":["streamlined2/data-processor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamlined2%2Fdata-processor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamlined2%2Fdata-processor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamlined2%2Fdata-processor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamlined2%2Fdata-processor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/streamlined2","download_url":"https://codeload.github.com/streamlined2/data-processor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243489805,"owners_count":20298997,"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":["jackson","jackson-stream","java-17","junit5","maven","xml"],"created_at":"2024-11-19T14:13:45.121Z","updated_at":"2025-03-13T21:45:11.985Z","avatar_url":"https://github.com/streamlined2.png","language":"Java","readme":"\u003ch1\u003eЗапуск програми\u003c/h1\u003e\nМетод \u003ci\u003e\u003cb\u003emain\u003c/b\u003e\u003c/i\u003e класу \u003ci\u003e\u003cb\u003ecom.streamlined.dataprocessor.Driver\u003c/b\u003e\u003c/i\u003e отримує як параметри теку файлів даних і назву властивості основної сутності \u003ci\u003e\u003cb\u003ePerson\u003c/b\u003e\u003c/i\u003e, для якої формуються статистичні дані. Наприклад, можливі значення назви властивості \u003ci\u003e\u003cb\u003eeyeColor\u003c/b\u003e\u003c/i\u003e, \u003ci\u003e\u003cb\u003ehairColor\u003c/b\u003e\u003c/i\u003e, \u003ci\u003e\u003cb\u003efavoriteMeals\u003c/b\u003e\u003c/i\u003e (містить перелік улюблених страв, розділених комами). \u003cp\u003e\n\n\u003ch1\u003eОпис сутностей\u003c/h1\u003e\n\u003cp\u003e\nОсновна сутність \u003cb\u003e\u003ci\u003ecom.streamlined.dataprocessor.entity.Person\u003c/i\u003e\u003c/b\u003e Фізична особа\n        \u003cp\u003eАтрибути\u003cp\u003e\n\t\t\u003ci\u003e \n        \u003cul\u003e\n        \u003cli\u003eім'я \u003cb\u003ename\u003c/b\u003e\u003c/li\u003e\n\t\t\u003cli\u003eдень народження \u003cb\u003ebirthday\u003c/b\u003e\u003c/li\u003e\n\t\t\u003cli\u003eстать \u003cb\u003esex\u003c/b\u003e\u003c/li\u003e\n\t\t\u003cli\u003eколір очей \u003cb\u003eeyeColor\u003c/b\u003e\u003c/li\u003e\n\t\t\u003cli\u003eколір волосся \u003cb\u003ehairColor\u003c/b\u003e\u003c/li\u003e\n\t\t\u003cli\u003eвага \u003cb\u003eweight\u003c/b\u003e\u003c/li\u003e\n\t\t\u003cli\u003eзріст \u003cb\u003eheight\u003c/b\u003e\u003c/li\u003e\n\t\t\u003cli\u003eкраїна походження \u003cb\u003ecountryOfOrigin\u003c/b\u003e\u003c/li\u003e\n\t\t\u003cli\u003eкраїна громадянства \u003cb\u003ecitizenship\u003c/b\u003e\u003c/li\u003e\n\t\t\u003cli\u003eперелік улюблених страв \u003cb\u003efavoriteMeals\u003c/b\u003e (строки, розділені комами)\u003c/li\u003e\n        \u003c/ul\u003e\n        \u003c/i\u003e\n        \u003c/p\u003e\nДодаткова сутність \u003cb\u003e\u003ci\u003ecom.streamlined.dataprocessor.entity.Country\u003c/i\u003e\u003c/b\u003e Країна походження або країна громадянства особи\n        \u003cp\u003eАтрибути\u003cp\u003e\n\t\t\u003ci\u003e \n        \u003cul\u003e\n        \u003cli\u003eназва \u003cb\u003ename\u003c/b\u003e\u003c/li\u003e\n\t\t\u003cli\u003eконтинент розташування \u003cb\u003econtinent\u003c/b\u003e\u003c/li\u003e\n\t\t\u003cli\u003eстолиця \u003cb\u003ecapital\u003c/b\u003e\u003c/li\u003e\n\t\t\u003cli\u003eнаселення \u003cb\u003epopulation\u003c/b\u003e\u003c/li\u003e\n\t\t\u003cli\u003eплоща \u003cb\u003esquare\u003c/b\u003e\u003c/li\u003e\n        \u003c/ul\u003e\n        \u003c/i\u003e\n        \u003c/p\u003e    \n\u003c/p\u003e\n\n\u003ch1\u003eЗразки файлів даних та результату\u003c/h1\u003e\nнаведені за посиланнями\n\u003cp\u003e\u003ci\u003ehttps://github.com/streamlined2/data-processor/tree/main/src/main/resources\u003c/i\u003e\n\u003cp\u003e\u003ci\u003ehttps://github.com/streamlined2/data-processor/tree/main/src/main/resources/data\u003c/i\u003e\n\u003cp\u003e\n\u003ch1\u003eВимірювання часу парсингу для різної кількості потоків\u003c/h1\u003e\n\u003cp\u003e\nТестовий набір був попередньо створений за допомогою класу \u003cb\u003e\u003ci\u003ecom.streamlined.dataprocessor.datagenerator.PersonDataGenerator\u003c/b\u003e\u003c/i\u003e із параметрами \u003ci\u003e \u003cb\u003ePERSON_COUNT\u003c/b\u003e\u003c/i\u003e  (загальна кількість сутностей) 1_000_000, та \u003ci\u003e\u003cb\u003eFILE_COUNT\u003c/b\u003e\u003c/i\u003e  (кількість файлів) 100.\u003cp\u003e\nВимірювання виконане за допомогою тесту \u003cb\u003e\u003ci\u003ecom.streamlined.dataprocessor.parser.MultithreadParsePerformanceTest.measureParseTime\u003c/i\u003e\u003c/b\u003e\n\u003cp\u003e\n\u003col\u003e\n\u003cli\u003e  Number of threads 1, parsing duration 10566 msec\u003c/li\u003e\n\u003cli\u003e  Number of threads 1, parsing duration 8124 msec\u003c/li\u003e\n\u003cli\u003e  Number of threads 2, parsing duration 5235 msec\u003c/li\u003e\n\u003cli\u003e  Number of threads 4, parsing duration 3231 msec\u003c/li\u003e\n\u003cli\u003e  Number of threads 8, parsing duration 2840 msec\u003c/li\u003e\n\u003c/ol\u003e\nТривалість парсингу для одного потоку виміряно двічі, бо другий і наступні результати менші через буферизацію на рівні операційної системи, тож перший результат завищений і може бути відкинутий.\u003cp\u003e\nЗбільшення кількості потоків вдвічі призводить до прискорення парсингу, але швидкість зростає повільніше, ніж вдвічі, через обмеження інших складових системи і втрати часу на координацію потоків.\n\u003c/p\u003e\n\nЧас парсингу значень однієї властивості сутності для такого ж набору даних за допомогою Jackson Streaming API (тест \u003cb\u003e\u003ci\u003ecom.streamlined.dataprocessor.parser.MultithreadParsePerformanceTest.measureStreamingParseTime\u003c/b\u003e\u003c/i\u003e) значно менший, що свідчить про перевагу даного методу. Крім того, він потребує лише фіксований обсяг пам'яті буферу для збереження даних перед опрацюванням, без виділення пам'яті для створення повної колекції сутностей.\n\u003cp\u003e\n\u003col\u003e\n\u003cli\u003e  Number of threads 1, parsing duration 4671 msec via Streaming API\u003c/li\u003e\n\u003cli\u003e  Number of threads 1, parsing duration 4616 msec via Streaming API\u003c/li\u003e\n\u003cli\u003e  Number of threads 2, parsing duration 2461 msec via Streaming API\u003c/li\u003e\n\u003cli\u003e  Number of threads 4, parsing duration 1721 msec via Streaming API\u003c/li\u003e\n\u003cli\u003e  Number of threads 8, parsing duration 1247 msec via Streaming API\u003c/li\u003e\n\u003c/ol\u003e\n\u003c/p\u003e\n\u003c/p\u003e","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamlined2%2Fdata-processor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstreamlined2%2Fdata-processor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamlined2%2Fdata-processor/lists"}