{"id":18010184,"url":"https://github.com/p-e-w/pingpong","last_synced_at":"2026-04-04T13:39:31.477Z","repository":{"id":55033498,"uuid":"328327373","full_name":"p-e-w/pingpong","owner":"p-e-w","description":"End-to-end latency monitoring for Matrix","archived":false,"fork":false,"pushed_at":"2021-01-26T04:31:13.000Z","size":44,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-16T17:33:28.201Z","etag":null,"topics":["matrix","matrix-org","tui"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/p-e-w.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}},"created_at":"2021-01-10T07:27:38.000Z","updated_at":"2023-09-08T18:17:02.000Z","dependencies_parsed_at":"2022-08-14T09:40:40.886Z","dependency_job_id":null,"html_url":"https://github.com/p-e-w/pingpong","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/p-e-w%2Fpingpong","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-e-w%2Fpingpong/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-e-w%2Fpingpong/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-e-w%2Fpingpong/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p-e-w","download_url":"https://codeload.github.com/p-e-w/pingpong/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235374611,"owners_count":18979734,"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":["matrix","matrix-org","tui"],"created_at":"2024-10-30T02:13:16.802Z","updated_at":"2025-10-05T07:31:20.035Z","avatar_url":"https://github.com/p-e-w.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## PingPong: End-to-end latency monitoring for Matrix\n\n![build](https://github.com/p-e-w/pingpong/workflows/build/badge.svg)\n[![Go Report Card](https://goreportcard.com/badge/github.com/p-e-w/pingpong)](https://goreportcard.com/report/github.com/p-e-w/pingpong)\n![GPL-3.0 License](https://img.shields.io/github/license/p-e-w/pingpong)\n[![#pingpong:matrix.org](https://img.shields.io/matrix/pingpong:matrix.org?label=%23pingpong%3Amatrix.org)](https://matrix.to/#/#pingpong:matrix.org)\n\nPingPong measures transport latencies on [Matrix](https://matrix.org/) networks.\nIt connects to two Matrix accounts simultaneously, and bounces messages\nback and forth between them. It aggregates all information in an intuitive\nterminal user interface, and automatically computes statistics.\n\n![Screenshot](https://user-images.githubusercontent.com/2702526/104276628-481ebb80-54cb-11eb-8b13-dc53378a6c08.png)\n\nPingPong aims to be a good citizen on homeservers. It gracefully recovers\nfrom various temporary error conditions, has built-in rate limiting mechanisms,\nand cleans up after itself to the maximum extent possible in the Matrix\necosystem, even if an error occurs or the program crashes.\n\nPingPong is built using the excellent\n[Mautrix](https://github.com/tulir/mautrix-go),\n[Tcell](https://github.com/gdamore/tcell),\nand [Kong](https://github.com/alecthomas/kong) packages.\n\n\n## Installation and usage\n\nPingPong requires Go (Golang) to build. Installing PingPong is simple:\n\n```\ngo get github.com/p-e-w/pingpong\n```\n\nMake sure your `$GOPATH/bin` directory is in your `$PATH`; you should\nnow be able to run PingPong with\n\n```\npingpong @user1:homeserver1.org:password1 @user2:homeserver2.org:password2\n```\n\nRun\n\n```\npingpong --help\n```\n\nfor a complete description of the command line interface.\n\n\n## What it measures\n\nThe **total time** metric represents the time from a message being\nprepared and sent by the sender to the message having been received,\nparsed, and processed by the recipient. Preparation, parsing, and\nprocessing should take on the order of microseconds in most cases,\nso this is the end-to-end transport latency for practical purposes.\nThis time is calculated using a single local monotonic clock and is\ntherefore *always* accurate.\n\nThe **client -\u003e server** metric is the time from a message being\nprepared and sent to the message being forwarded by the sender's\nhomeserver to the recipient's homeserver, as indicated by the event's\n`origin_server_ts` field. Note that the send time is measured by\nthe local clock whereas the `origin_server_ts` field is populated\nusing the homeserver's clock. Therefore, the accuracy of this metric\ndepends on how closely those two clocks are synchronized.\n\nThe **server -\u003e server** metric is the time from a message being\nforwarded by the sender's homeserver to the message being processed\nby the recipient's homeserver, as indicated by the event's\n`unsigned.age` field. The accuracy of this metric depends on how\nclosely the two homeservers' clocks are synchronized.\n\nThe **server -\u003e client** metric is the time from a message being\nprocessed by the recipient's homeserver to the message having been\nreceived, parsed, and processed by the recipient, as indicated by\na combination of the event's `origin_server_ts` and `unsigned.age`\nfields. The accuracy of this metric depends on how closely the\nlocal clock and the two homeservers' clocks are synchronized.\n\nPingPong performs basic sanity checks on those metrics, and if they\nindicate that any clocks are out of sync or the event's timestamps are\notherwise unreliable, breakdown metrics are not displayed.\n\n\n## Similar projects\n\n[echo](https://github.com/maubot/echo) is a Matrix bot that replies with\ntiming information when sent a ping message. It is used to generate the\nping ranking in the \"This Week in Matrix\" blog posts.\n\n[matrix-monitor-bot](https://github.com/turt2live/matrix-monitor-bot) is\nanother Matrix bot that measures message latency, and serves the results\nas Prometheus metrics, suitable for integration into an existing monitoring\nsolution.\n\nThese bots work, but I wanted a traditional command line tool with\neverything included, zero configuration required, and a beautiful\nterminal UI. That is what PingPong tries to be.\n\n\n## License\n\nCopyright \u0026copy; 2021  Philipp Emanuel Weidmann (\u003cpew@worldwidemann.com\u003e)\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n\n**By contributing to this project, you agree to release your\ncontributions under the same license.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp-e-w%2Fpingpong","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp-e-w%2Fpingpong","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp-e-w%2Fpingpong/lists"}