)]}'
{
  "commit": "305947bc3e2a7ee2be5bdb629646acf3fab348be",
  "tree": "96ca516b9df41143d152951b51eb12d6f2fe488d",
  "parents": [
    "a5eed98d964bc48790041aed41a8876fa0b7eba5"
  ],
  "author": {
    "name": "Michael Brown",
    "email": "mcb30@ipxe.org",
    "time": "Wed Oct 21 20:00:02 2026 +0100"
  },
  "committer": {
    "name": "Michael Brown",
    "email": "mcb30@ipxe.org",
    "time": "Thu Oct 22 14:04:17 2026 +0100"
  },
  "message": "[peerdist] Add \"peerstat\" command for reporting peer statistics\n\nEach PeerDist-encoded downloaded file typically results in several\nthousand individual block downloads, each of which may end up being\nattempted as a classic retrieval from a discovered peer, a retrieval\nfrom an optimistically assumed peer, a retrieval from a hosted cache\nserver, a read from a local filesystem cache, and/or a raw range\nrequest from the origin server.\n\nThe sheer volume of activity and the number of errors expected in\nnormal operation (e.g. for blocks missing from a particular peer) make\nit difficult to use debug messages to gain insights into behaviour,\nsince per-event debug messages are either too rare to be informative\nor so frequent that the overhead of printing the messages alters the\noverall behaviour.\n\nGather error statistics separately for each category of individual\nblock download and for each discovery address family, along with the\nmost useful summary counts (e.g. for total blocks, total number of\ndiscovery attempts, etc).\n\nEstimate the total number of peers as being the highest number of\npeers ever discovered for a segment within a single address family.\n(We count per address family to avoid double-counting a single peer\nthat advertises itself using both IPv4 and IPv6 addresses.)\n\nReport the number of discovery attempts independent of address family\n(i.e. one discovery attempt means N transmitted packets, one sent via\neach of the N supported address families), since that number is then\nmeaningfully comparable against the total number of blocks.\n\nReport second and subsequent discovery attempts separately from\ninitial discovery attempts, so that the number of discovery attempts\ncan be compared against the number of blocks to determine how many\ndiscoveries were elided completely.\n\nSeparate the discovery reply statistics by address family, not because\nthere is anything useful in knowing whether a particular error\nhappened for IPv4 versus IPv6, but because it avoids the need to\nreason about whether or not a displayed result needs to be mentally\nhalved in order to be compared against the corresponding discovery\nattempt statistic.\n\nSigned-off-by: Michael Brown \u003cmcb30@ipxe.org\u003e\n",
  "tree_diff": [
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "2a7719ffcd3a0afab08b14152fb2f94fe8875aaf",
      "new_mode": 33188,
      "new_path": "src/config/config_peerdist.c"
    },
    {
      "type": "modify",
      "old_id": "43858dceb324b5ea222cc7b98b44e3e95bfbec43",
      "old_mode": 33188,
      "old_path": "src/config/general.h",
      "new_id": "2c1be637fa64f80e23a6b2a1cbb53abab62c8c30",
      "new_mode": 33188,
      "new_path": "src/config/general.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "4d8cc179da966b9f2d1a8c65eb54bf5e70f29285",
      "new_mode": 33188,
      "new_path": "src/hci/commands/peermgmt_cmd.c"
    },
    {
      "type": "modify",
      "old_id": "596c78b5760e90cfa5fd55e9c741ca7ad8809664",
      "old_mode": 33188,
      "old_path": "src/include/ipxe/peerblk.h",
      "new_id": "a223f7312ad07cdbf8fcaf15e6bbac95527e0c42",
      "new_mode": 33188,
      "new_path": "src/include/ipxe/peerblk.h"
    },
    {
      "type": "modify",
      "old_id": "38b4d51216f183f453a16978411b233cdd7cab4d",
      "old_mode": 33188,
      "old_path": "src/include/ipxe/peerdisc.h",
      "new_id": "ab0105392fe5f59e9682a4510ca03e3f5856dcb2",
      "new_mode": 33188,
      "new_path": "src/include/ipxe/peerdisc.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "d58d6bf19e0a9f4e4f210f0bcc7f6f6934d2e685",
      "new_mode": 33188,
      "new_path": "src/include/ipxe/peerdist.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "eed8459b00fd157cb8bfb89541938520181e0b71",
      "new_mode": 33188,
      "new_path": "src/include/usr/peermgmt.h"
    },
    {
      "type": "modify",
      "old_id": "1d9a795879b7330a15d3c9329eb205294556d5ef",
      "old_mode": 33188,
      "old_path": "src/net/peerblk.c",
      "new_id": "28737e03e5dccf5beaf74cd4a927b16c5afd2e76",
      "new_mode": 33188,
      "new_path": "src/net/peerblk.c"
    },
    {
      "type": "modify",
      "old_id": "4d7b1cf5fa215217bc208a69311f7e499b7ab88e",
      "old_mode": 33188,
      "old_path": "src/net/peerdisc.c",
      "new_id": "fe97097cdc218bf8e665646d1afd65b21971d369",
      "new_mode": 33188,
      "new_path": "src/net/peerdisc.c"
    },
    {
      "type": "modify",
      "old_id": "8e0f5dc138aeb775a0c9d7af79c7cc9c3d608113",
      "old_mode": 33188,
      "old_path": "src/net/peerdist.c",
      "new_id": "3f64a9b79a8571c5ea33f37c0d3ba7066a58d585",
      "new_mode": 33188,
      "new_path": "src/net/peerdist.c"
    },
    {
      "type": "modify",
      "old_id": "d6301903a8b0b8f59dfa83e97b051312b7fb6374",
      "old_mode": 33188,
      "old_path": "src/net/peermux.c",
      "new_id": "0ea1171f1abc2bd6a3aef895e835e8af808e7fa1",
      "new_mode": 33188,
      "new_path": "src/net/peermux.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "0ef89975b18c4941be4c02afe9337b84b8db4112",
      "new_mode": 33188,
      "new_path": "src/usr/peermgmt.c"
    }
  ]
}
