{"id":17716881,"url":"https://github.com/u8views/go-u8views","last_synced_at":"2026-01-14T10:51:57.475Z","repository":{"id":65388420,"uuid":"584519265","full_name":"u8views/go-u8views","owner":"u8views","description":"GitHub profile views tracker: displaying monthly view statistics","archived":false,"fork":false,"pushed_at":"2025-12-27T19:55:18.000Z","size":1354,"stargazers_count":767,"open_issues_count":6,"forks_count":10,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-29T07:19:23.812Z","etag":null,"topics":["badge","view-counter"],"latest_commit_sha":null,"homepage":"https://u8views.com","language":"HTML","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/u8views.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-01-02T19:55:28.000Z","updated_at":"2025-12-28T14:24:16.000Z","dependencies_parsed_at":"2023-04-24T21:09:46.858Z","dependency_job_id":"a85c9892-0fa9-4bd1-a10b-b061d13d31f2","html_url":"https://github.com/u8views/go-u8views","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/u8views/go-u8views","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u8views%2Fgo-u8views","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u8views%2Fgo-u8views/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u8views%2Fgo-u8views/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u8views%2Fgo-u8views/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/u8views","download_url":"https://codeload.github.com/u8views/go-u8views/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u8views%2Fgo-u8views/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28417716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["badge","view-counter"],"created_at":"2024-10-25T14:01:12.063Z","updated_at":"2026-01-14T10:51:57.470Z","avatar_url":"https://github.com/u8views.png","language":"HTML","readme":"# [u8views.com](https://u8views.com)\n[![u8views profile views](https://u8views.com/api/v1/github/profiles/121827373/views/day-week-month-total-count.svg)](https://u8views.com/github/u8views)\n\n### Profile views counter\n[![Yaroslav Podorvanov profile views](https://github.com/u8views/go-u8views/blob/main/public/assets/images/yaroslav-podorvanov-developer.jpg?raw=true)](https://u8views.com/github/YaroslavPodorvanov)\n\n# Articles\n- Reddit | [I built a GitHub profile view counter](https://www.reddit.com/r/webdev/comments/1n9zdel/i_built_a_github_profile_view_counter/)\n- Peerlist | [GitHub profile views counter](https://peerlist.io/podorvanov/project/github-profile-views-counter)\n\n### Development\n\n##### Start local development session\n```bash\ncp .local.env .env\nmake env-up\nmake migrate-all-reset\nmake postgres-fixtures\nmake postgres-fixtures-count\n# and\n# make postgres-fixtures-clear\n```\n\n##### Run after code changes\n```bash\nmake env-up\n```\n\n##### End development session\n```bash\nmake env-down\n# or\n# make env-down-with-clear\n```\n\n##### Benchmark (PC) Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz\n```bash\nBENCHTIME=100x make bench\n```\n```text\nBenchmarkProfileStatsService\nBenchmarkProfileStatsService-12    \t     100\t    627990 ns/op\t    5033 B/op\t      80 allocs/op\nPASS\nok  \tgithub.com/u8views/go-u8views/internal/tests\t0.088s\n```\n```bash\nBENCHTIME=1000x make bench\n```\n```text\nBenchmarkProfileStatsService\nBenchmarkProfileStatsService-12    \t    1000\t    449478 ns/op\t    4124 B/op\t      72 allocs/op\nPASS\nok  \tgithub.com/u8views/go-u8views/internal/tests\t0.471s\n```\n```bash\nBENCHTIME=10000x make bench\n```\n```text\nBenchmarkProfileStatsService\nBenchmarkProfileStatsService-12    \t   10000\t    546875 ns/op\t    4885 B/op\t      81 allocs/op\nPASS\nok  \tgithub.com/u8views/go-u8views/internal/tests\t5.492s\n```\n\n##### Benchmark ([vultr.com](https://www.vultr.com/?ref=8741375) VPS 1024.00 MB High Frequency) Intel Core Processor (Skylake, IBRS)\n```bash\nBENCHTIME=100x make bench\n```\n```text\nBenchmarkProfileStatsService\nBenchmarkProfileStatsService \t     100\t   2275173 ns/op\t    1562 B/op\t      43 allocs/op\nPASS\nok  \tgithub.com/u8views/go-u8views/internal/tests\t0.360s\n```\n```bash\nBENCHTIME=1000x make bench\n```\n```text\nBenchmarkProfileStatsService\nBenchmarkProfileStatsService \t    1000\t   2121516 ns/op\t    1571 B/op\t      44 allocs/op\nPASS\nok  \tgithub.com/u8views/go-u8views/internal/tests\t2.153s\n```\n```bash\nBENCHTIME=10000x make bench\n```\n```text\nBenchmarkProfileStatsService\nBenchmarkProfileStatsService \t   10000\t   2153319 ns/op\t    1574 B/op\t      44 allocs/op\nPASS\nok  \tgithub.com/u8views/go-u8views/internal/tests\t21.566s\n```\n\n### Database schema templates\n* [DrawSQL](https://drawsql.app/templates)\n\n### Database schema\n![Database schema](https://github.com/u8views/go-u8views/blob/main/database-schema/v003.png?raw=true)\n\n### SQL\n```sql\nSELECT user_id, SUM(count), COUNT(*)\nFROM profile_hourly_views_stats\nGROUP BY user_id\nORDER BY SUM(count) DESC\nLIMIT 100;\n```\n```sql\nSELECT g.time::TIMESTAMP\nFROM (\n    SELECT time::TIMESTAMP\n    FROM generate_series(\n        (DATE_TRUNC('DAY', NOW()) - INTERVAL '1 MONTH')::TIMESTAMP,\n        (DATE_TRUNC('DAY', NOW()))::TIMESTAMP,\n        '1 DAY'::INTERVAL\n    ) AS time\n) AS g;\n```\n\n### Stats\n```sql\nSELECT DATE_TRUNC('MONTH', time) AS month,\n       COUNT(*)                  AS views,\n       COUNT(DISTINCT (user_id)) AS users,\n       SUM(\"count\")              AS total\nFROM profile_hourly_views_stats\nGROUP BY 1\nORDER BY 1;\n```\n| Month      | Views | Users | Total   |\n|------------|-------|-------|---------|\n| 2023-01-01 | 15    | 3     | 78      |\n| 2023-02-01 | 438   | 18    | 2700    |\n| 2023-03-01 | 951   | 32    | 10241   |\n| 2023-04-01 | 1110  | 36    | 3441    |\n| 2023-05-01 | 2191  | 43    | 9032    |\n| 2023-06-01 | 3433  | 57    | 16866   |\n| 2023-07-01 | 3331  | 54    | 14233   |\n| 2023-08-01 | 4539  | 69    | 18017   |\n| 2023-09-01 | 4519  | 77    | 17053   |\n| 2023-10-01 | 4473  | 78    | 15771   |\n| 2023-11-01 | 4919  | 96    | 17567   |\n| 2023-12-01 | 5525  | 115   | 19882   |\n| 2024-01-01 | 11185 | 232   | 40202   |\n| 2024-02-01 | 11348 | 245   | 39586   |\n| 2024-03-01 | 13581 | 273   | 48629   |\n| 2024-04-01 | 13613 | 291   | 47198   |\n| 2024-05-01 | 14655 | 306   | 50581   |\n| 2024-06-01 | 13924 | 319   | 57695   |\n| 2024-07-01 | 14589 | 338   | 55751   |\n| 2024-08-01 | 15593 | 380   | 51997   |\n| 2024-09-01 | 16034 | 400   | 54388   |\n| 2024-10-01 | 16599 | 455   | 56601   |\n| 2024-11-01 | 16500 | 474   | 56818   |\n| 2024-12-01 | 16511 | 483   | 58579   |\n| 2025-01-01 | 19778 | 534   | 67856   |\n| 2025-02-01 | 18914 | 597   | 112192  |\n| 2025-03-01 | 20892 | 611   | 70920   | \n| 2025-04-01 | 20738 | 630   | 67782   | \n| 2025-05-01 | 21916 | 638   | 125460  | \n| 2025-06-01 | 20758 | 689   | 62625   | \n| 2025-07-01 | 23749 | 688   | 2407710 | \n| 2025-08-01 | 23726 | 686   | 78508   |\n\n```sql\nSELECT                                    \n    DATE_TRUNC('month', created_at),\n    COUNT(*)                \nFROM users                               \nGROUP BY 1                     \nORDER BY 1;\n```\n| Month      | Users |\n|------------|-------|\n| 2023-01-01 | 3     |\n| 2023-02-01 | 24    |\n| 2023-03-01 | 29    |\n| 2023-04-01 | 15    |\n| 2023-05-01 | 23    |\n| 2023-06-01 | 37    |\n| 2023-07-01 | 7     |\n| 2023-08-01 | 33    |\n| 2023-09-01 | 27    |\n| 2023-10-01 | 23    |\n| 2023-11-01 | 37    |\n| 2023-12-01 | 53    |\n| 2024-01-01 | 189   |\n| 2024-02-01 | 65    |\n| 2024-03-01 | 62    |\n| 2024-04-01 | 65    |\n| 2024-05-01 | 49    |\n| 2024-06-01 | 50    |\n| 2024-07-01 | 52    |\n| 2024-08-01 | 74    |\n| 2024-09-01 | 87    |\n| 2024-10-01 | 107   |\n| 2024-11-01 | 91    |\n| 2024-12-01 | 88    |\n| 2025-01-01 | 98    |\n| 2025-02-01 | 133   |\n| 2025-03-01 | 90    |\n| 2025-04-01 | 107   |\n| 2025-05-01 | 76    |\n| 2025-06-01 | 88    |\n| 2025-07-01 | 105   |\n| 2025-08-01 | 67    |\n","funding_links":[],"categories":["🧩 Badges 👇"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fu8views%2Fgo-u8views","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fu8views%2Fgo-u8views","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fu8views%2Fgo-u8views/lists"}