{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":257259929,"defaultBranch":"main","name":"time","ownerLogin":"facebook","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2020-04-20T11:29:32.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/69631?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1713539195.0","currentOid":""},"activityList":{"items":[{"before":"18207c5d8ddc7242e8d4192985898b6dbe66932c","after":"da4c1ac49fb1a4e446e3465c073a5508e4d16ae2","ref":"refs/heads/main","pushedAt":"2024-07-02T11:48:55.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"Add check certificate CA bundle\n\nSummary:\nWhat?\n\nChanges calnex/cert/cert.go Verify/2 function to validate the target host certificate against known CAs\n\nWhy?\n\nCurrently machines are not getting their certificates reconfigured because validation succeds with invalid certificates signed by unkown authority. This change makes it so verification will fail, and thus certificates will be reprovisioned.\n\nConsiderations:\n\nWhy use x509 Verify function?\nMakes implementation simpler and consistent with implementation done by other libraries. We get other errors \"for free\" for other validations we are not doing right now.\n - Alternative:\n - if we want to add unknown authority error only, we can capture the x509.UnknownAuthorityError and translate that to an error of ours.\n\nWhy change the 2nd argument of the function to x509.VerifyOptions?\n\nChange in arguments is required to pass the CA roots for testing. Usage of this struct could be useful for future changes in implementation, as well as making our function more compatible with other code that uses x509 lib.\n\n- Alternatives:\n - Instead of x509.VerifyOptions, add a 3rd argument to the function to pass the CA certs.\n\n - Implement a new function with the additional validation, in case there is concern about backwards compatibility\n\nWhy recreate certs?\nRequired to be able to create a positive test case, as our previous test cert was self signed\n\nReviewed By: deathowl\n\nDifferential Revision: D59225682\n\nfbshipit-source-id: 340e4081908837f2b7b461a8c0d424e10de8600e","shortMessageHtmlLink":"Add check certificate CA bundle"}},{"before":"546619986dff04764032569994bbde9f36733c8d","after":"18207c5d8ddc7242e8d4192985898b6dbe66932c","ref":"refs/heads/main","pushedAt":"2024-06-26T11:43:46.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"Updates Serverstats to Chrony 4.5\n\nSummary:\nWhat?\nSupports Chrony 4.5 by introducing ReplyServerStats4, supporting chrony reply type 25\n\nWhy? (copied from Task)\n\nWe use Chrony as an NTP client fleet-wide, and collect metrics from it using a tool called ntpcheck (written by us in Go).\n\nThe tool in turn talks to Chrony using undocumented management interface which we implemented Go library for in https://fburl.com/code/njwkya7v\n\nRecent Chrony release 4.5 updated the internal part of that interface (which is expected to change without backwards compatibility), and introduced new ServerStats struct.\n\nThis diff adds support to this new struct\n\nReviewed By: abulimov\n\nDifferential Revision: D59054442\n\nfbshipit-source-id: c8d6e2b3a9092030702d18bc7ed624c4eacaf68f","shortMessageHtmlLink":"Updates Serverstats to Chrony 4.5"}},{"before":"1b61852af5f26356bc1ed210042453f6f99747c0","after":"546619986dff04764032569994bbde9f36733c8d","ref":"refs/heads/main","pushedAt":"2024-06-25T11:53:10.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"fetch firmware version once (#375)\n\nSummary:\nPull Request resolved: https://github.com/facebook/time/pull/375\n\nInstead of parsing the firmware version every time we call `Version` lets parse it once when we initialize the firmware struct. This will save us some lookups especially when managing many devices.\nAlso it's much faster\n\nReviewed By: abulimov\n\nDifferential Revision: D58999323\n\nfbshipit-source-id: 17c005d77d2f4ff007d3ff02b4208ec9b6124537","shortMessageHtmlLink":"fetch firmware version once (#375)"}},{"before":"b656f6accbd919e173407cc62d3d46b5f08a35b4","after":"1b61852af5f26356bc1ed210042453f6f99747c0","ref":"refs/heads/main","pushedAt":"2024-06-25T10:20:22.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"debug logging in mode dev only\n\nSummary: I think this will work to further limit when we debug print - see [post](https://fb.workplace.com/groups/metatime/posts/7907279529320848/).\n\nReviewed By: leoleovich\n\nDifferential Revision: D58963864\n\nfbshipit-source-id: d77287170e42ef031dfa53466412a79574db5f52","shortMessageHtmlLink":"debug logging in mode dev only"}},{"before":"4db09adcc1ec9ae3b6dda1dfcf41db77ca89b246","after":"b656f6accbd919e173407cc62d3d46b5f08a35b4","ref":"refs/heads/main","pushedAt":"2024-06-24T19:17:30.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"Add static lib target (#374)\n\nSummary:\nPull Request resolved: https://github.com/facebook/time/pull/374\n\nPrevious changes to conda build caused build breakages due to fbclock.so not being copied correctly. One of the suggestions was to make it static lib that further links to libnccl. So that all the upper layers only have to worry about managing libnccl.so, as they already do and not concern with managing other dependent libs.\n\nIn this take2, introduce static lib target for fbclock, that will be further be linked to libnccl.so in subsequent changes.\n\nReviewed By: leoleovich\n\nDifferential Revision: D58930591\n\nfbshipit-source-id: c6bbaa6e1e6c050b302b11b3a7d682e799d049b9","shortMessageHtmlLink":"Add static lib target (#374)"}},{"before":"c05fe4822dcf9c34f23ac8146a4b9ad34bda23ef","after":"4db09adcc1ec9ae3b6dda1dfcf41db77ca89b246","ref":"refs/heads/main","pushedAt":"2024-06-20T14:31:56.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"avoid creating net.IP in ptp4u server (#373)\n\nSummary:\nPull Request resolved: https://github.com/facebook/time/pull/373\n\nSimple optimization.\nInstead of creating a net.IP from SockAddr, and then creating a SockAddr from this IP, just with different port, we simply copy the address and set a new port value.\n\nReviewed By: leoleovich\n\nDifferential Revision: D58814643\n\nfbshipit-source-id: b8ed919c5be7d877e060ca0d044fc77ef86be017","shortMessageHtmlLink":"avoid creating net.IP in ptp4u server (#373)"}},{"before":"9a1041c97cae75a3843bfd88dbb084844f080c2e","after":"c05fe4822dcf9c34f23ac8146a4b9ad34bda23ef","ref":"refs/heads/main","pushedAt":"2024-06-19T15:57:23.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"skip responder test if we can't bind to a port (#372)\n\nSummary:\nPull Request resolved: https://github.com/facebook/time/pull/372\n\nAvoids failure on Github CI.\n```\n2024-06-19T12:58:52.4053342Z === RUN TestServer\n2024-06-19T12:58:52.4074565Z server_test.go:173:\n2024-06-19T12:58:52.4075930Z \tError Trace:\t/home/runner/work/time/time/ntp/responder/server/server_test.go:173\n2024-06-19T12:58:52.4078272Z \tError: \tExpected nil, but got: &net.OpError{Op:\"listen\", Net:\"udp\", Source:net.Addr(nil), Addr:(*net.UDPAddr)(0xc00011c030), Err:(*os.SyscallError)(0xc000134000)}\n2024-06-19T12:58:52.4080083Z \tTest: \tTestServer\n2024-06-19T12:58:52.4080739Z --- FAIL: TestServer (0.00s)\n2024-06-19T12:58:52.4081199Z FAIL\n```\nAlso remove clearly broken (not even compiling) tests for darwin and freebsd:\n```\n~/d/time-fork go test github.com/facebook/time/ntp/responder/server/...\n# github.com/facebook/time/ntp/responder/server [github.com/facebook/time/ntp/responder/server.test]\nntp/responder/server/server_darwin_test.go:49:17: undefined: tc\nFAIL\tgithub.com/facebook/time/ntp/responder/server [build failed]\nFAIL\n```\n\nReviewed By: deathowl\n\nDifferential Revision: D58785363\n\nfbshipit-source-id: 4ae91df7d71bccb0f38e27d4f86293f953b98829","shortMessageHtmlLink":"skip responder test if we can't bind to a port (#372)"}},{"before":"81310981f32719f067d8ed4f51afea5450a0c177","after":"9a1041c97cae75a3843bfd88dbb084844f080c2e","ref":"refs/heads/main","pushedAt":"2024-06-19T13:50:39.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"fix ntpdate compilation on 32bit platform (#371)\n\nSummary:\nPull Request resolved: https://github.com/facebook/time/pull/371\n\nDifferent structs on different platforms.\n\nReviewed By: leoleovich, deathowl\n\nDifferential Revision: D58781067\n\nfbshipit-source-id: d381ffd68acc41ce87a0599ae92b03150766f1f8","shortMessageHtmlLink":"fix ntpdate compilation on 32bit platform (#371)"}},{"before":"24e2c049ca62ccd76e509de1d6afd4de9947023d","after":"81310981f32719f067d8ed4f51afea5450a0c177","ref":"refs/heads/main","pushedAt":"2024-06-18T18:36:46.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"use netip.Addr in sptp to reduce heap allocations (#370)\n\nSummary:\nPull Request resolved: https://github.com/facebook/time/pull/370\n\nnew cool netip package provides better version of IP type, which is fixed length, can be passed by value, is comparable and thus can be used as map keys.\nWe save plenty of allocations by not converting IPs to strings to use as map keys.\n\nReviewed By: leoleovich, deathowl\n\nDifferential Revision: D58733846\n\nfbshipit-source-id: d844d6481967169134d7d825c9689f523de82031","shortMessageHtmlLink":"use netip.Addr in sptp to reduce heap allocations (#370)"}},{"before":"68edcd66cd3aa7b379463b29b87571f0a36b623e","after":"24e2c049ca62ccd76e509de1d6afd4de9947023d","ref":"refs/heads/main","pushedAt":"2024-06-18T14:30:20.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"more robust ntpdate implementation (#369)\n\nSummary:\nPull Request resolved: https://github.com/facebook/time/pull/369\n\nWork-around a bug in Linux kernel which reads to `recvmsg` syscall blocking forever when we receive the response too fast.\n\nReviewed By: leoleovich\n\nDifferential Revision: D58667259\n\nfbshipit-source-id: 56f1d933c76ea0df60195d242053fff8fc7df0f2","shortMessageHtmlLink":"more robust ntpdate implementation (#369)"}},{"before":"a61623e0cd4723b385ece0297bc68b92e89cbed3","after":"68edcd66cd3aa7b379463b29b87571f0a36b623e","ref":"refs/heads/main","pushedAt":"2024-06-18T13:50:26.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"conform to CRC-32C (phase 3, final)\n\nSummary:\nSee base of stack.\n\nIMPORTANT: The previous phase must be fully rolled out before landing this diff.\n\nReviewed By: abulimov, ahmadexp\n\nDifferential Revision: D43412349\n\nfbshipit-source-id: 9e136fee387933b1313193168861730554d26a5f","shortMessageHtmlLink":"conform to CRC-32C (phase 3, final)"}},{"before":"fc601db93fd26cdb9fe20a2ae45961c0931fb0bb","after":"a61623e0cd4723b385ece0297bc68b92e89cbed3","ref":"refs/heads/main","pushedAt":"2024-06-18T10:33:58.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"reduce heap allocations #15 (#368)\n\nSummary:\nPull Request resolved: https://github.com/facebook/time/pull/368\n\nUse highly optimized `ReadPacketBuf` instead of `ReadFromUDP` which is very similar to what we do in `ptp4u`.\n\nReviewed By: abulimov\n\nDifferential Revision: D58703243\n\nfbshipit-source-id: 286f552762616b074f18f52d01c614a70869f8a6","shortMessageHtmlLink":"reduce heap allocations #15 (#368)"}},{"before":"8111a2d1476c07e9187ff3cde8fef0c6f7392746","after":"fc601db93fd26cdb9fe20a2ae45961c0931fb0bb","ref":"refs/heads/main","pushedAt":"2024-06-17T17:24:33.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"Allow specifying build directory for fbclock.so (#362)\n\nSummary:\nPull Request resolved: https://github.com/facebook/time/pull/362\n\nThis allows fbclock.so to be built in specified directory, which helps with later changes to build with nccl.\n\nReviewed By: leoleovich\n\nDifferential Revision: D58228662\n\nfbshipit-source-id: 9a9562642a8a61b490035521e7b2e953cec4997c","shortMessageHtmlLink":"Allow specifying build directory for fbclock.so (#362)"}},{"before":"787b111453d296c852507a9deab0efcfaff2cbdc","after":"8111a2d1476c07e9187ff3cde8fef0c6f7392746","ref":"refs/heads/main","pushedAt":"2024-06-17T15:05:50.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"use proper type of error code for hard failure check (#366)\n\nSummary:\nPull Request resolved: https://github.com/facebook/time/pull/366\n\nhttp.Client returns errors of type *url.Error which is no longer *net.OpErr\nadd check for this type of errors in isHardFailure() check\n\nReviewed By: leoleovich\n\nDifferential Revision: D58670925\n\nfbshipit-source-id: 7db245b0eadcd18f38eee3b9b931fefbd482670c","shortMessageHtmlLink":"use proper type of error code for hard failure check (#366)"}},{"before":"5b340019af0cf8d50d9ecc9385aa4569452b3f09","after":"787b111453d296c852507a9deab0efcfaff2cbdc","ref":"refs/heads/main","pushedAt":"2024-06-17T14:31:21.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"reduce heap allocation #14\n\nSummary: As we have a BMCA wrapper anyway, let's not copy announces to a new slice and instead just use the data source\n\nReviewed By: abulimov\n\nDifferential Revision: D58670992\n\nfbshipit-source-id: 88f49bd491cef0eb0db33d10cd8fb43137f6481d","shortMessageHtmlLink":"reduce heap allocation #14"}},{"before":"33e1d70827dee305931691df24c5a1b90a570bcb","after":"5b340019af0cf8d50d9ecc9385aa4569452b3f09","ref":"refs/heads/main","pushedAt":"2024-06-14T14:46:48.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"change good status string\n\nSummary: with R19.2 the ready status string has changed from \"Ready\" to \"ReadyForMeasurement\" in modules status report. Update the code accordingly\n\nReviewed By: abulimov\n\nDifferential Revision: D58584083\n\nfbshipit-source-id: 4b7ec57c2aacce74ae8c80136b752db183d5412d","shortMessageHtmlLink":"change good status string"}},{"before":"9b8c0c3f5bf51816272e449ec173694243cd4455","after":"33e1d70827dee305931691df24c5a1b90a570bcb","ref":"refs/heads/main","pushedAt":"2024-06-14T09:44:43.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"reduce heap allocation #13 (#365)\n\nSummary:\nPull Request resolved: https://github.com/facebook/time/pull/365\n\nAvoid recreating error group, context and a cancel func by replacing them with a channel.\n\nReviewed By: abulimov\n\nDifferential Revision: D58472316\n\nfbshipit-source-id: 64d6df51ba63df8700b8bf7d17586c38ed7d90b7","shortMessageHtmlLink":"reduce heap allocation #13 (#365)"}},{"before":"266142121850387b13dc2b3199697db2632fc45c","after":"9b8c0c3f5bf51816272e449ec173694243cd4455","ref":"refs/heads/main","pushedAt":"2024-06-14T09:10:09.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"fix TestExportFail test\n\nSummary: Some assumptions have changed and the test is failing with \"localhost\". Hard failure can be simulated by another IP\n\nReviewed By: abulimov\n\nDifferential Revision: D58577773\n\nfbshipit-source-id: c0b82f1dc16b028da4b2570457528e53f8cfbc8c","shortMessageHtmlLink":"fix TestExportFail test"}},{"before":"cd4c75e1e2453cb09576413c574b49ded4b27f30","after":"266142121850387b13dc2b3199697db2632fc45c","ref":"refs/heads/main","pushedAt":"2024-06-13T16:24:37.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"improve backoff logic\n\nReviewed By: abulimov\n\nDifferential Revision: D58530424\n\nfbshipit-source-id: f40cf3e64b73af0b259fb44eb677ada2bec83837","shortMessageHtmlLink":"improve backoff logic"}},{"before":"3b1737f6da22251769fee475a6214fa2be9a954d","after":"cd4c75e1e2453cb09576413c574b49ded4b27f30","ref":"refs/heads/main","pushedAt":"2024-06-13T11:41:51.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"do not fail if no measurements running for clear command\n\nSummary: Clear command maybe needed even if the device is half-broken, or not configured. In this case no measurements can be running. Replace the error check and try to stop measurements if possible, but do not report error back.\n\nReviewed By: leoleovich\n\nDifferential Revision: D58522428\n\nfbshipit-source-id: 09bb1195ae70caf73a30e6f58fa1ac9775d97241","shortMessageHtmlLink":"do not fail if no measurements running for clear command"}},{"before":"c967447924bd8fb55b841d94b99602611c1a3b47","after":"3b1737f6da22251769fee475a6214fa2be9a954d","ref":"refs/heads/main","pushedAt":"2024-06-12T16:46:39.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"reduce heap allocations #12\n\nSummary:\n* Make `corrToDuration` as a method of `Correction`\n* Migrate usages\n* Implement tests\n\nThis should help to avoid allocations in logging, but definitely improve code readability\n\nReviewed By: deathowl\n\nDifferential Revision: D58468150\n\nfbshipit-source-id: 76d91cbc317435729595a81e2ee0dd2193e4fb54","shortMessageHtmlLink":"reduce heap allocations #12"}},{"before":"45858144a8d69cecca6ac660125f5bb7cb0b4115","after":"c967447924bd8fb55b841d94b99602611c1a3b47","ref":"refs/heads/main","pushedAt":"2024-06-12T15:57:12.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"reduce heap allocations #11 (#364)\n\nSummary:\nPull Request resolved: https://github.com/facebook/time/pull/364\n\nBy not openning/closing device every time we read/adjust we will not just save tons of allocations, we will actually prevent \"hangups\" on the kernel IO open/close syscalls.\n\nReviewed By: abulimov, vvfedorenko\n\nDifferential Revision: D58465569\n\nfbshipit-source-id: 272ee024fd33da89354863409c45bb846d3aa3c5","shortMessageHtmlLink":"reduce heap allocations #11 (#364)"}},{"before":"dfc67bcb9a86816dc6d8a6ce94593925befe147d","after":"45858144a8d69cecca6ac660125f5bb7cb0b4115","ref":"refs/heads/main","pushedAt":"2024-06-12T14:04:36.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"reduce heap allocations #10\n\nSummary:\nReuse the delay request buffer\n```\nROUTINE ======================== github.com/facebook/time/ptp/sptp/client.(*Client).SendEventMsg in time/ptp/sptp/client/client.go\n 0 5462 (flat, cum) 3.53% of Total\n . . 120:func (c *Client) SendEventMsg(p ptp.Packet) (uint16, time.Time, error) {\n . . 121:\tseq := c.eventSequence\n . . 122:\tp.SetSequence(c.eventSequence)\n . 5462 123:\tb, err := ptp.Bytes(p)\n```\n {F1686268020}\n\nReviewed By: abulimov\n\nDifferential Revision: D58462288\n\nfbshipit-source-id: bf2e44c513cb07a46e1702b171c79597c081ae92","shortMessageHtmlLink":"reduce heap allocations #10"}},{"before":"ba8af0304ba1f5459c6f4c8dedd8c510bb2df21e","after":"dfc67bcb9a86816dc6d8a6ce94593925befe147d","ref":"refs/heads/main","pushedAt":"2024-06-12T11:15:23.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"reduce heap allocations #9\n\nSummary: Make random strings constants so no allocations happen\n\nReviewed By: deathowl\n\nDifferential Revision: D58460100\n\nfbshipit-source-id: fc04815d3cf25397ad122330ce0adf2105d5e5d4","shortMessageHtmlLink":"reduce heap allocations #9"}},{"before":"6bd60510c0b788872c89d36a1a9820149afc22b8","after":"ba8af0304ba1f5459c6f4c8dedd8c510bb2df21e","ref":"refs/heads/main","pushedAt":"2024-06-11T18:48:01.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"reduce heap allocations #8\n\nSummary: We don't need to recreate a new \"process\" every time we want to collect stats\n\nReviewed By: abulimov\n\nDifferential Revision: D58419351\n\nfbshipit-source-id: 36b7e07d55270fc2ce2ef4aadbbdcea1b634a35e","shortMessageHtmlLink":"reduce heap allocations #8"}},{"before":"6ab7f9fdb45ca11a1d7b621ac85b36762efa8155","after":"6bd60510c0b788872c89d36a1a9820149afc22b8","ref":"refs/heads/main","pushedAt":"2024-06-11T17:14:19.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"reduce heap allocations #7\n\nSummary: Outgoing delay request packet is pretty much constant, no point in generating it every time - can save tons of allocations\n\nReviewed By: abulimov\n\nDifferential Revision: D58417951\n\nfbshipit-source-id: 7f85fb27f764dade22bd73f0b4e12556ede7919f","shortMessageHtmlLink":"reduce heap allocations #7"}},{"before":"fa7eed6d51bb886f6be98c4fc2a083e3839ee2b8","after":"6ab7f9fdb45ca11a1d7b621ac85b36762efa8155","ref":"refs/heads/main","pushedAt":"2024-06-11T16:25:03.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"reduce heap allocations #6\n\nSummary: Cache stats snapshot\n\nReviewed By: abulimov, deathowl\n\nDifferential Revision: D58414699\n\nfbshipit-source-id: f49ecd3da01b7b70e838adcec4e4e25064b6e496","shortMessageHtmlLink":"reduce heap allocations #6"}},{"before":"7940a9b508a563e8f3f65f937b1431a022d42b58","after":"fa7eed6d51bb886f6be98c4fc2a083e3839ee2b8","ref":"refs/heads/main","pushedAt":"2024-06-11T11:51:20.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"reduce heap allocations in protocol (#361)\n\nSummary:\nPull Request resolved: https://github.com/facebook/time/pull/361\n\nOptimize few conversions using bit shifts.\n\nReviewed By: leoleovich\n\nDifferential Revision: D58408274\n\nfbshipit-source-id: 34af37f0f8d1a25bb22f93cd184f0511bee5f843","shortMessageHtmlLink":"reduce heap allocations in protocol (#361)"}},{"before":"5855b3ad1c915e08994eb5541461f939e853e41d","after":"7940a9b508a563e8f3f65f937b1431a022d42b58","ref":"refs/heads/main","pushedAt":"2024-06-10T16:30:52.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"reduce heap allocation #5\n\nSummary:\nReplace `container/ring` with own implementation without allocations.\nAlthough it's a nice container, it does very many allocations:\n```\nROUTINE ======================== github.com/facebook/time/ptp/sptp/client.(*slidingWindow).add in time/ptp/sptp/client/window.go\n 32768 32768 (flat, cum) 61.25% of Total\n . . 51:func (w *slidingWindow) add(sample float64) {\n . . 52:\tw.samples = w.samples.Next()\n . . 53:\tv := w.samples.Value.(float64)\n . . 54:\tif !math.IsNaN(v) {\n . . 55:\t\tw.sum -= v\n . . 56:\t}\n . . 57:\tif !w.Full() {\n . . 58:\t\tw.currentSize++\n . . 59:\t}\n 32768 32768 60:\tw.samples.Value = sample\n . . 61:\tw.sum += sample\n```\n\nIt's very easy to reimplement with 0 allocations and I personally think it's actually easier to read\n\nReviewed By: abulimov\n\nDifferential Revision: D58363718\n\nfbshipit-source-id: d01e466ec80c841ff9a897a51b40d28b684ebfa0","shortMessageHtmlLink":"reduce heap allocation #5"}},{"before":"3bb35587cea99d603f4f53279bf367a54edd75c0","after":"5855b3ad1c915e08994eb5541461f939e853e41d","ref":"refs/heads/main","pushedAt":"2024-06-10T14:36:58.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"reduce heap allocations #4\n\nSummary:\nRework debug logger for received/sent:\n* Remove colours\n* Remove helpers to avoid redundant `fmt.Sprintf`\n\nReviewed By: abulimov, yarikk\n\nDifferential Revision: D58360899\n\nfbshipit-source-id: 2a1f11b102b6074c867c840668caa39563e5c51d","shortMessageHtmlLink":"reduce heap allocations #4"}}],"hasNextPage":true,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEdL_DkQA","startCursor":null,"endCursor":null}},"title":"Activity ยท facebook/time"}