{"id":19197500,"url":"https://github.com/meetmatt/metrics","last_synced_at":"2026-04-04T06:35:29.680Z","repository":{"id":37018273,"uuid":"168297755","full_name":"meetmatt/metrics","owner":"meetmatt","description":"Application metrics with TIG stack","archived":false,"fork":false,"pushed_at":"2024-05-09T02:51:16.000Z","size":642,"stargazers_count":5,"open_issues_count":39,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-09T00:42:38.578Z","etag":null,"topics":["docker","grafana","influxdb","mysql","nginx","php","redis","restful-api","slim-framework","statsd","telegraf"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/meetmatt.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,"zenodo":null}},"created_at":"2019-01-30T07:19:20.000Z","updated_at":"2020-04-06T07:20:13.000Z","dependencies_parsed_at":"2024-05-09T03:41:43.155Z","dependency_job_id":null,"html_url":"https://github.com/meetmatt/metrics","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meetmatt%2Fmetrics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meetmatt%2Fmetrics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meetmatt%2Fmetrics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meetmatt%2Fmetrics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meetmatt","download_url":"https://codeload.github.com/meetmatt/metrics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253171210,"owners_count":21865280,"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":["docker","grafana","influxdb","mysql","nginx","php","redis","restful-api","slim-framework","statsd","telegraf"],"created_at":"2024-11-09T12:17:01.459Z","updated_at":"2026-04-04T06:35:29.620Z","avatar_url":"https://github.com/meetmatt.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Metrics Demo\n\n## Usage\n\n- Install dependencies: `make`\n- Be aware that composer is configured to ignore file system changes. You must run `make` each time you create, move, rename or delete files in `src`.\n- Start the containers: `docker-compose up -d`\n- Watch the client using the app: `docker-compose logs -f client`\n- Open Grafana http://localhost:3000 (credentials = admin/admin)\n- add data source (Configuration -\u003e Data Sources -\u003e Add Data Source): URL = http://influxdb:8086, db = `metrics`\n- add dashboard (New Dashboard -\u003e Import Dashboard -\u003e Upload .json file) from `docker/grafana/dashboards`\n- Scale client application to 10, 20, 40 instances and watch the changes on the dashboard: `make scale-up clients=10`\n(`make scale-down` for downgrading the load back to 1 client again)\n- watch all the containers live with `ctop`:\n```bash\ndocker run -it --name ctop --rm -v /var/run/docker.sock:/var/run/docker.sock wrfly/ctop:latest\n```\n\n## Application\n\n### ToDo list manager\n\nSee `test/support/todo.http`.\n\n- Registration\n- Login\n- Get all lists\n- Get one list\n- Create list\n- Delete list\n- Get tasks\n- Create task\n- Mark task as done\n- Mark task as not done\n- Delete task\n\n## TODO: Instrumentation\n\n- HTTP response status metrics\n- Response time metrics\n- Business metrics (total/minute):\n    - registrations\n    - logins\n    - created lists\n    - created tasks\n    - done tasks\n    \n## Degradation scenarios\n\n1. Decrease/increase number of clients.\n2. Decrease/increase wait time between client actions.\n3. Decrease/increase number of php-fpm workers.\n4. Decrease/increase size of nginx connection pool.\n5. Drop/add mysql index.\n6. Flush redis.\n7. Decrease curl connection timeout on client.\n8. Decrease curl operation timeout on client.\n9. Add sleep in server index.php.\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeetmatt%2Fmetrics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeetmatt%2Fmetrics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeetmatt%2Fmetrics/lists"}