mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
Merge pull request #9309 from cakebaker/bump_markdownlint_cli2_action
Bump `markdownlint_cli2_action` & fix warnings
This commit is contained in:
@@ -149,7 +149,7 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
RUSTDOCFLAGS="-Dwarnings" cargo doc ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} --no-deps --workspace --document-private-items
|
||||
- uses: DavidAnson/markdownlint-cli2-action@v20
|
||||
- uses: DavidAnson/markdownlint-cli2-action@v21
|
||||
with:
|
||||
fix: "true"
|
||||
globs: |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Platform support
|
||||
|
||||
<!-- markdownlint-disable MD033 -->
|
||||
<!-- markdownlint-disable MD033 MD060 -->
|
||||
|
||||
uutils aims to be as "universal" as possible, meaning that we try to support
|
||||
many platforms. However, it is infeasible for us to guarantee that every
|
||||
@@ -19,13 +19,13 @@ platform support, with different guarantees. We support two tiers of platforms:
|
||||
|
||||
The platforms in tier 1 and the platforms that we test in CI are listed below.
|
||||
|
||||
| Operating system | Tested targets |
|
||||
| ---------------- | -------------- |
|
||||
| Operating system | Tested targets |
|
||||
| ---------------- | ------------------------ |
|
||||
| **Linux** | `x86_64-unknown-linux-gnu` <br> `x86_64-unknown-linux-musl` <br> `arm-unknown-linux-gnueabihf` <br> `i686-unknown-linux-gnu` <br> `aarch64-unknown-linux-gnu` |
|
||||
| **macOS** | `x86_64-apple-darwin` |
|
||||
| **macOS** | `x86_64-apple-darwin` |
|
||||
| **Windows** | `i686-pc-windows-msvc` <br> `x86_64-pc-windows-gnu` <br> `x86_64-pc-windows-msvc` |
|
||||
| **FreeBSD** | `x86_64-unknown-freebsd` |
|
||||
| **Android** | `i686-linux-android` |
|
||||
| **Android** | `i686-linux-android` |
|
||||
|
||||
The platforms in tier 2 are more vague, but include:
|
||||
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
The amount of time spent in which part of the code can vary depending on the files being joined and the flags used.
|
||||
A benchmark with `-j` and `-i` shows the following time:
|
||||
|
||||
| Function/Method | Fraction of Samples | Why? |
|
||||
| ---------------- | ------------------- | ---- |
|
||||
| `Line::new` | 27% | Linear search for field separators, plus some vector operations. |
|
||||
| `read_until` | 22% | Mostly libc reading file contents, with a few vector operations to represent them. |
|
||||
| `Input::compare` | 20% | ~2/3 making the keys lowercase, ~1/3 comparing them. |
|
||||
| `print_fields` | 11% | Writing to and flushing the buffer. |
|
||||
| Other | 20% | |
|
||||
| libc | 25% | I/O and memory allocation. |
|
||||
| Function/Method | Fraction of Samples | Why? |
|
||||
| ---------------- | ------------------- | ---------------------------------------------------------------------------------- |
|
||||
| `Line::new` | 27% | Linear search for field separators, plus some vector operations. |
|
||||
| `read_until` | 22% | Mostly libc reading file contents, with a few vector operations to represent them. |
|
||||
| `Input::compare` | 20% | ~2/3 making the keys lowercase, ~1/3 comparing them. |
|
||||
| `print_fields` | 11% | Writing to and flushing the buffer. |
|
||||
| Other | 20% | |
|
||||
| libc | 25% | I/O and memory allocation. |
|
||||
|
||||
More detailed profiles can be obtained via [flame graphs](https://github.com/flamegraph-rs/flamegraph):
|
||||
|
||||
|
||||
+10
-10
@@ -29,7 +29,7 @@ suitable, and that if a file is given as its input directly (as in
|
||||
### Counting lines and UTF-8 characters
|
||||
|
||||
If the flags set are a subset of `-clm` then the input doesn't have to be decoded. The
|
||||
input is read in chunks and the `bytecount` crate is used to count the newlines (`-l` flag)
|
||||
input is read in chunks and the `bytecount` crate is used to count the newlines (`-l` flag)
|
||||
and/or UTF-8 characters (`-m` flag).
|
||||
|
||||
It's useful to vary the line length in the input. GNU wc seems particularly
|
||||
@@ -83,16 +83,16 @@ performance. For example, `hyperfine 'wc somefile' 'uuwc somefile'`.
|
||||
|
||||
If you want to get fancy and exhaustive, generate a table:
|
||||
|
||||
| | moby64.txt | odyssey256.txt | 25Mshortlines | /usr/bin/docker |
|
||||
|------------------------|--------------|------------------|-----------------|-------------------|
|
||||
| `wc <FILE>` | 1.3965 | 1.6182 | 5.2967 | 2.2294 |
|
||||
| `wc -c <FILE>` | 0.8134 | 1.2774 | 0.7732 | 0.9106 |
|
||||
| | moby64.txt | odyssey256.txt | 25Mshortlines | /usr/bin/docker |
|
||||
|-------------------------|--------------|------------------|-----------------|-------------------|
|
||||
| `wc <FILE>` | 1.3965 | 1.6182 | 5.2967 | 2.2294 |
|
||||
| `wc -c <FILE>` | 0.8134 | 1.2774 | 0.7732 | 0.9106 |
|
||||
| `uucat <FILE> \| wc -c` | 2.7760 | 2.5565 | 2.3769 | 2.3982 |
|
||||
| `wc -l <FILE>` | 1.1441 | 1.2854 | 2.9681 | 1.1493 |
|
||||
| `wc -L <FILE>` | 2.1087 | 1.2551 | 5.4577 | 2.1490 |
|
||||
| `wc -m <FILE>` | 2.7272 | 2.1704 | 7.3371 | 3.4347 |
|
||||
| `wc -w <FILE>` | 1.9007 | 1.5206 | 4.7851 | 2.8529 |
|
||||
| `wc -lwcmL <FILE>` | 1.1687 | 0.9169 | 4.4092 | 2.0663 |
|
||||
| `wc -l <FILE>` | 1.1441 | 1.2854 | 2.9681 | 1.1493 |
|
||||
| `wc -L <FILE>` | 2.1087 | 1.2551 | 5.4577 | 2.1490 |
|
||||
| `wc -m <FILE>` | 2.7272 | 2.1704 | 7.3371 | 3.4347 |
|
||||
| `wc -w <FILE>` | 1.9007 | 1.5206 | 4.7851 | 2.8529 |
|
||||
| `wc -lwcmL <FILE>` | 1.1687 | 0.9169 | 4.4092 | 2.0663 |
|
||||
|
||||
Beware that:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user