summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2022-04-26Center README logobrianc118-patch-2Brian Chen
2022-04-25bump up solana crate versions and fix a bunch of related cratesLei Shi
Summary: allow-large-files Upgrading async-compression with a patch because they are using old versions of zstd (renamed to libzstd in their dependencies) and zstd-safe Updated aes-gcm-siv and curve25519-dalek too. Please refer to inline comments. Here is how I pinned the crate: - git clone the repo - git checkout the tag - make changes - git push -f origin HEAD:master - use the commit hash and your forked repo to update cargo.toml Reviewed By: wqfish Differential Revision: D35585200 fbshipit-source-id: 70c51bf1902c6eaf72004a49bc2be9eaf782e360
2022-04-25below: fix typo in help menuJoshua Miller
Summary: Fixed typo in help menu Reviewed By: dschatzberg Differential Revision: D35682302 fbshipit-source-id: 1f7b93ad95636f00853941b8af459e9bbc195242
2022-04-18Move field_ids.rsBrian Chen
Reviewed By: dschatzberg Differential Revision: D35557841 fbshipit-source-id: 8c52a68676881f1fcacd24a8a541d2a591455c33
2022-04-18Implement traits for Field::U32Brian Chen
Summary: I missed implementing some traits for Field::U32. Reviewed By: dschatzberg Differential Revision: D35557842 fbshipit-source-id: 891a53d91a8bfee94389f5f26d63a31035332c7f
2022-04-15Handle unsupported pressure metrics gracefullyDan Schatzberg
Summary: Capture the error and report it nicely in cgroupfs and then squash it in below. Reviewed By: brianc118 Differential Revision: D35560379 fbshipit-source-id: d64699cfac457536adb2f98522b55a64b09524f0
2022-04-13Collection for memory.zswap.currentPasha Vorobyev
Summary: Adding `memory.zswap.current` to below collector. NB that this file does not exist everywhere but the failed reads should not cause too much load :) Reviewed By: dschatzberg, brianc118 Differential Revision: D35581380 fbshipit-source-id: ee4cc54bcadfa736a78e7aaaca0d1f753cc9f59a
2022-04-13Add support for memory.zswap.currentPasha Vorobyev
Summary: We want to collect memory.zswap.current so that we can easily debug & monitor rollout of the `memory.zswap.current` cgroup file Reviewed By: dschatzberg, lnyng, brianc118 Differential Revision: D35581379 fbshipit-source-id: 81d1f50952ec9183023931cdd668ff4ba49904b3
2022-04-13Add collection of cpu.pressure fullDan Schatzberg
Summary: below will start to collect cpu.pressure full This technically introduces a breaking change to below dump where if one expects "Cpu Pressure" to be "some" it will now be "full". But I deemed that reasonable in favor of consistency. Reviewed By: brianc118 Differential Revision: D35559098 fbshipit-source-id: b0703d389e45be5e20a564558328851f23ae7996
2022-04-13Add support for cpu.pressure fullDan Schatzberg
Summary: cpu.pressure does support full values now, support it as an optional. Reviewed By: brianc118 Differential Revision: D35559099 fbshipit-source-id: 6a2da5dd77db3adfd2bc3213efd6c90bb7a264ae
2022-04-12rust: update crossterm to 0.23.0 and arc-swap to 1.5.0Huapeng Zhou
Summary: Needed to import [cloud-hypervisor](https://github.com/cloud-hypervisor/cloud-hypervisor). (Note: this ignores all push blocking failures!) Reviewed By: dtolnay Differential Revision: D34434866 fbshipit-source-id: 69741b4ac767e0ab5ecc8307dd40267d9dcbf4ae
2022-04-11third-party/rust: Update tempfile to v3.3.0Jason White
Reviewed By: jsgf Differential Revision: D35477506 fbshipit-source-id: ef10c8f7548a21c0fb3d83d5debfe2e000657d08
2022-04-10rust: update serde_json to 1.0.79 and serde to 1.0.136Huapeng Zhou
Summary: Needed to import [cloud-hypervisor](https://github.com/cloud-hypervisor/cloud-hypervisor). (Note: this ignores all push blocking failures!) Reviewed By: dtolnay Differential Revision: D34433589 fbshipit-source-id: f92ea3ba640d19f170513b558f3d5208790bab67
2022-04-07rust: update anyhow to 1.0.56Huapeng Zhou
Summary: Needed by cloud-hypervisor https://github.com/cloud-hypervisor/cloud-hypervisor/blob/main/Cargo.toml#L19. (Note: this ignores all push blocking failures!) Reviewed By: jsgf Differential Revision: D34432496 fbshipit-source-id: deaa320c74a22e325a116bcc0d5b0120c4f3744b
2022-04-05Add symlink patch to tar-rsJohn Watson
Summary: Pulling in this patch until the **[patch](https://github.com/alexcrichton/tar-rs/commit/f4f439ca0cd3a984d2a66fb8e42f6e2307876afd)** ~~is approved, lands, and~~ makes it into crates.io NOTE: I feel a little awkward patching ***everyone*** here — I suspect I'm the only that cares. **[I attempted to add a "tar-symlink" package pinned to 4.38](https://www.internalfb.com/intern/paste/P491303978/?view=diff)**, with the patch applying to that, but and then updating only `dotsync2` accordingly, but that results in the same cascading changes seen here; I suspect due to the patch applying to package "tar" (since "tar-symlink" isn't a thing). Reviewed By: zertosh Differential Revision: D35350696 fbshipit-source-id: a5653f3aed0eb5bc5424906d24a53ec2c2b79211
2022-03-31rust: update thiserror to 1.0.30Huapeng Zhou
Summary: Needed to import [cloud-hypervisor](https://github.com/cloud-hypervisor/cloud-hypervisor/blob/main/Cargo.toml#L31). Reviewed By: dtolnay Differential Revision: D34437972 fbshipit-source-id: 9f22bb1fde83308a319f40e138d9ab7f180c7fa0
2022-03-29Reformat with new rustfmt 6/7David Tolnay
Summary: Generated by `tools/arcanist/lint/codemods/rustfmt-fbsource` with the rustfmt executable added by D35234535 (https://github.com/facebookincubator/below/commit/414933008895475ae6d862efa48559ae409184a9). drop-conflicts Reviewed By: zertosh Differential Revision: D35234533 fbshipit-source-id: 5117764eb3f6b783e24227329694534a67371e5c
2022-03-29Reformat with new rustfmt 5/7David Tolnay
Summary: Generated by `tools/arcanist/lint/codemods/rustfmt-fbsource` with the rustfmt executable added by D35234535 (https://github.com/facebookincubator/below/commit/414933008895475ae6d862efa48559ae409184a9). drop-conflicts Reviewed By: zertosh Differential Revision: D35234532 fbshipit-source-id: 1b42795d253afa7e016c43bbaccb4198dd2c6046
2022-03-29Update to version 1.4.38-nightly from nightly-2022-03-28David Tolnay
Summary: The changes from the old "rustfmt 2.x" branch, which we upgraded to in D23569308, have since been merged into the master branch of rustfmt under the flag `version = "Two"`. Fixes like needed for https://fb.workplace.com/groups/learningrust/posts/545143730235002 now only land to master; there is no separate 2.x branch in development. This diff pulls in the newest version of rustfmt so that we can handle any new syntax and pick up fixes to rustfmt issues that we report or contribute. The tools/third-party/rustfmt changes in this diff are generated by: ``` $ echo nightly-2022-03-28 > tools/third-party/rustfmt/.rustfmt-version $ tools/third-party/rustfmt/rustfmt-upgrade ``` Reviewed By: zertosh Differential Revision: D35234535 fbshipit-source-id: c79454fa918cf052312418dd271404e85bf872b2
2022-03-29Prepare for rustfmt upgrade 10/13David Tolnay
Summary: Context: I am upgrading rustfmt in D35234535. --- This diff contains all the formatting changes which are idempotent between the old and the new version of rustfmt. It's generated by formatting with the new rustfmt, then formatting immediately again with the old rustfmt. If there are any big changes in here, that's code that old rustfmt used to crash on but new rustfmt handles correctly. Separating out this part of the changes prior to flipping the rustfmt version switch globally allows the amount of code that needs to be landed atomically to be smaller, since this diff is independent and can land at any point before the rest of the stack. --- Reviewed By: zertosh Differential Revision: D35234514 fbshipit-source-id: 10bc442e143591be9e6f10ba360952a1779764c1
2022-03-29Switch configuration to 2021 editionDavid Tolnay
Summary: This results in no formatting changes for the Rust code that's in fbcode today, but it does affect the configuration of the Rust parser that `rustfmt` parses its input with. There are some language changes between 2018 edition and 2021 edition: for example the macro input in `m!(s"")` is 2 tokens in 2018 edition and 1 token in 2021 edition. Thus even absent any formatting differences, it's possible that different error messages would be produced on a particular input by `rustfmt --edition 2018` vs `rustfmt --edition 2021`, so it's best for us to keep the rustfmt edition in sync with the edition that Buck runs rustc with, which is: https://www.internalfb.com/code/fbsource/[b25775c8103c84ae602d9bcf297595b56f932f5a]/tools/buckconfigs/fbsource-common.bcfg?lines=324-325 Reviewed By: zertosh Differential Revision: D35234518 fbshipit-source-id: c1b9ab47f4e592b7fd1530d39af878775cf1dc18
2022-03-25Removed period after destination file name to removeBrian Chen
Summary: The output destination file is suffixed with a period, which makes it confusing as it looks like it's part of the file name. It also makes it trickier to copy. Let's remove it. Reviewed By: plv Differential Revision: D35148337 fbshipit-source-id: 6a01eeed462bff12570573e0695f9304c87e6ebc
2022-03-24Update Cargo.lock and fix build (#8134)Brian Chen
Summary: Pull Request resolved: https://github.com/facebookincubator/below/pull/8134 Test Plan: CI Reviewed By: lnyng Differential Revision: D35093036 Pulled By: brianc118 fbshipit-source-id: 5e3cb977266ab265c44fb1b9908b640068827fd8
2022-03-23Run cargo_from_buckBaojun Wang
Summary: Run autocargo update strayed Cargo.toml files. Reviewed By: Imxset21 Differential Revision: D35100002 fbshipit-source-id: a9b7828d488d8525473be3c63e0fab5aa3750218
2022-03-23rust: update libc from 0.2.117 to 0.2.121Huapeng Zhou
Summary: Needed to import cloud-hypervisor https://github.com/cloud-hypervisor/cloud-hypervisor/blob/main/Cargo.toml#L25. Reviewed By: dtolnay Differential Revision: D35052728 fbshipit-source-id: bdd60925501c446ee6d429fad6e95d6593ff2544
2022-03-23Add GPU stats modeBrian Chen
Summary: Add CLI option to enable GPU stats Reviewed By: lnyng Differential Revision: D34292599 fbshipit-source-id: ae988957ca51c58256c99a031dce6a5f33f53f83
2022-03-22Bump nix crate from 0.22 => 0.23Javier Honduvilla Coto
Summary: Updating to be able to use `pwritev` and `preadv`. - Followed [the documentation on how to update crates](https://www.internalfb.com/intern/wiki/Rust-at-facebook/Managing_fbsource_third-party_with_Reindeer/). - These are all the changes between our current version and the updated one: https://github.com/nix-rust/nix/compare/v0.22.0..v0.23.1. See `CHANGELOG.md` for the most significant changes in this version. Let me know if I missed anything, this is my first crate upgrade! Reviewed By: jsgf Differential Revision: D34820818 fbshipit-source-id: 89f59a759bf042112e7d48612a345a8164dc7176
2022-03-21Version changes required for adding solana-client crateLei Shi
Summary: In order to add solana-client = "1.9.5" to third-party crates in fbcode, we need to update the versions of following crates. - sha2 - zstd related including zstd, zstd-sys, zstd-safe Next step is to add solana-client. Reviewed By: wqfish Differential Revision: D34648217 fbshipit-source-id: 719e499d9fbb4fd35624f3b9c46ffc6dfc94576d
2022-03-17Update Cargo.lock (#8133)Brian Chen
Summary: Pull Request resolved: https://github.com/facebookincubator/below/pull/8133 Reviewed By: lnyng Differential Revision: D34971872 Pulled By: brianc118 fbshipit-source-id: a6181d01b6ca2bab7f39d2fbe367929560aa4c78
2022-03-17Add more Clap constraintsBrian Chen
Summary: Make --snapshot incompatible with --host in replqy. Make --port require --host. Reviewed By: lnyng Differential Revision: D34963804 fbshipit-source-id: deae25fc8ae655cf3529a50c2e63db1e2c6bf7b7
2022-03-17structopt to clap3Brian Chen
Summary: Use clap3 instead of structopt. clap2 -> clap3 breaking changes: https://github.com/clap-rs/clap/blob/3d8ce3f4268e4fd02549a9cea32f18965272ac50/CHANGELOG.md#breaking-changes Reviewed By: lnyng Differential Revision: D34951502 fbshipit-source-id: 15689887c1086550655eec36e6a319e5dc42131d
2022-03-14Fix races in collector_plugin testBrian Chen
Summary: There are a few races in the test that show up in stress test. We need to use the barrier a few more times. Reviewed By: dschatzberg Differential Revision: D34598821 fbshipit-source-id: d97cf5f425b1fd58e4bbbd708a0ba77ed5f690a2
2022-03-11Make snapshot command take host by flagDan Schatzberg
Summary: This makes the behavior consistent with other commands where host is passed as a flag (--host) rather than a freestanding argument. Reviewed By: boyuni Differential Revision: D34820055 fbshipit-source-id: 23211990391f0507637a6f0a973cc8ddec9e27ed
2022-03-08add evm package to third-partyAndrey Chursin
Summary: This dependency allows to run basic evm inside rust process which we can use for tests Reviewed By: khiemngo Differential Revision: D34732105 fbshipit-source-id: 18f7a27c53365d88291c9cc61ffaa9bf68f88cef
2022-03-07Below -- Pick from available ports for test. (#8130)Antonis Manousis
Summary: Pull Request resolved: https://github.com/facebookincubator/below/pull/8130 Tests should pick from the pool of available ports when establishing a socket instead of making a random choice from a range. Reviewed By: boyuni Differential Revision: D34593877 fbshipit-source-id: d41af3c7c7d3649d441a7ddd513b5503b0d09b95
2022-03-02add py-polars third party libraryDavid Caruso
Summary: allow-large-files Add polars and py-polars rust packages, their description are: `Blazingly fast DataFrames in Rust, Python & Node.js` from https://github.com/pola-rs/polars NOTE: the only non-auto-generated changes are in `Cargo.toml` Those replace advantageously python pandas library when needing extra performance. The py-polar package contains rust code compiled as python extension. The added repo and git revision points to in the Cargo.toml is a minimal fork of mine to make it play nicer with the dependencies version: - In order to avoid zstd version issues in our repo, I killed dependency of this package on zstd by deactivating the feature making it compatible with "parquet" and "ipc" file format. - I deactivated the `simd` features as this did not compile in our repo. It needs a custom patch reflected in D34410953 to compile without those features. Both could eventually be fixed later if package gain popularity. Reviewed By: dtolnay Differential Revision: D34410955 fbshipit-source-id: fa6fa53e33e1b490324d7c96fed76beb344a6a85
2022-03-02Add GPU stats collectorBrian Chen
Reviewed By: lnyng Differential Revision: D33781520 fbshipit-source-id: f3559e7aac77ec12b3e0b2e692695c99f6505685
2022-03-01Adding context statements for better error descriptionsChinmay Garg
Summary: Adding contexts to existing lines for better error transparency. Reviewed By: brianc118 Differential Revision: D34556417 fbshipit-source-id: 7bc8477eb02797384a9570754eb155b3be23b082
2022-03-01Implement collector plugin frameworkBrian Chen
Summary: Add a collector plugin framework that allows new collectors to be easily added. For example, consider an expensive collector that takes seconds to gather data. We can simply implement a read function for this collector, run the collector plugin on a separate thread, and read samples on the main collection thread. **Latest sample** Only the latest sample is saved at any time. If the consumer thread is asking for samples more frequently than the collector thread is collecting, it is up to the consumer thread to cache the previously consumer sample and determine if it should continue to be used (e.g. based on timestamp of previous sample if this is provided by the collector). **Error handling** We consider two types of errors at collection. Recoverable errors are intended to be handled by the collection thread and are invisible to the consumer thread. Unrecoverable errors are handled by the collection thread and also sent to the consumer thread. Reviewed By: dschatzberg Differential Revision: D34192301 fbshipit-source-id: d823fcc1d18eb4863ac640716ba8d707b96af5a2
2022-02-28Updated README to include snapshot command (#8129)Chinmay Garg
Summary: * Added text for `below snapshot` command * Fixed below logo in readme Pull Request resolved: https://github.com/facebookincubator/below/pull/8129 Reviewed By: brianc118 Differential Revision: D34527756 Pulled By: chippermist fbshipit-source-id: 92c20781def5c0a6227a498cd47ed7043266ffd1
2022-02-25Adding option for snapshot file in replayChinmay Garg
Summary: Adding a new option in `below replay` to be able to accept the compressed file from the `snapshot` and run replay using the files. **Usage** ``` below replay -- --snapshot <snapshot_file> --time <timestamp> ``` Reviewed By: brianc118 Differential Revision: D34410231 fbshipit-source-id: 17af3214ed0a38fca86ac7dffb5b75d78b24363b
2022-02-25Add an every_n! macroBrian Chen
Summary: A simple every_n! macro that will execute given expression every n times. We can then do things like ``` every_n!(10, warn!(logger, "something")); ``` to log every 10 times and reduce log spam. Reviewed By: dschatzberg Differential Revision: D34464604 fbshipit-source-id: d474d421489d5b2f121f7a263591c72ef2053a98
2022-02-23fix config crate descriptionMichel Salim
Summary: 'Configeration' does not exist outside of Meta ;) Though apparently Heroku now has one too: https://github.com/heroku/configerator Fix spelling Reviewed By: davide125 Differential Revision: D34429734 fbshipit-source-id: dcad2b2987db82bdd285549b97bcf93b486cd531
2022-02-23Adding snapshot commandChinmay Garg
Summary: Adding a new command `snapshot` to the CLI utility. Usage: ``` below snapshot [OPTIONS] --begin <begin> --end <end> [host] ``` Currently when a user wants to create a dump (snapshot) in order to replay it later, they need to do it in a more tedius way involving multiple calls to be able to create the files required to replay such as below: ``` $ below debug convert-store --start-time <start-time> --end-time <end-time> --to-store-dir <snapshot-dir> # write a custom below.conf with custom store_dir $ below --config <my-config-with-snapshot-dir> replay ``` This new command will essentially simplify this by performing the action to call `debug` and store all the files needed to replay in a tarball. This tarball can then be extracted and used to reply. Reviewed By: brianc118 Differential Revision: D34161168 fbshipit-source-id: 2c5146279f87c1f4ebed150aee796cfc4706b31a
2022-02-22Refactor CollectorBrian Chen
Summary: Minor refactoring: * Make model::collect_sample private and always use Collector instead * Rename update_model() to collect_and_update_model() so it's clear that we collect first before computed latest model Reviewed By: lnyng Differential Revision: D34191763 fbshipit-source-id: ce2c8321d06acd5db303e9c3309b0a8215ef36f4
2022-02-17fix stat.blocks() on i686Michel Salim
Summary: `stat.blocks()` returns a `libc::fsblkcnt_t`; this is a `c_ulong` (`u32`) rather than a `u64`. i686: https://docs.rs/libc/latest/i686-unknown-linux-gnu/libc/type.fsblkcnt_t.html x86_64: https://docs.rs/libc/latest/x86_64-unknown-linux-gnu/libc/type.fsblkcnt_t.html Explicitly cast this to `u64` so it works as expected on all platforms. Reviewed By: brianc118 Differential Revision: D34308349 fbshipit-source-id: 4ad48b244998c1ef09ef18f3589d105f7c9d75c0
2022-02-15Don't read disks stats when it's turned offBrian Chen
Summary: We are still reading disk stats when collection is turned off, except we just don't save it to the sample/model. Let's stop reading altogether. Reviewed By: lnyng Differential Revision: D34191764 fbshipit-source-id: 2329f26dda0848568b4cdafdd24389b7b0808e98
2022-02-10fix image and Matrix room URLsMichel Salim
Summary: The Below logo was referenced as a relative path, so it works on GitHub but is broken on https://crates.io/crates/below . Use the full URL instead, and also use the public Matrix room URL rather than the hard-to-read internal name. Reviewed By: davide125 Differential Revision: D34151966 fbshipit-source-id: 41d408bb25fae252a92b34f630c3de26858ca30d
2022-02-08Improve thread usageLeon Yang
Summary: Add name to spawned threads to help understand thread usage. Reviewed By: brianc118 Differential Revision: D34064653 fbshipit-source-id: 54fe1f00a2af4afcb2a8fe628f7cf82184407fa5
2022-02-08Rename SerializedFrame enumsLeon Yang
Summary: SerializedFrame is very similar to `std::borrow::Cow<'a, [u8]>`, except that its owned type is Bytes instead of Vec. As a result we can't use Cow for our purpose. Byte is similar to Vec instead of it's ref counted, which is easier to use in our case. Rename SerializedFrame enum from Bytes to Owned and Slice to Borrowed to clarify ownship model. Reviewed By: boyuni Differential Revision: D34061719 fbshipit-source-id: b86c019dd5e0c1ae50d6004ef787f1a618d20492