2024-03-17 11:10:32 +00:00
|
|
|
[workspace.package]
|
|
|
|
authors = ["o2sh <ossama-hjaji@live.fr>"]
|
|
|
|
edition = "2021"
|
|
|
|
license = "MIT"
|
2024-05-07 22:05:47 +00:00
|
|
|
version = "2.21.0"
|
2024-03-17 11:10:32 +00:00
|
|
|
repository = "https://github.com/o2sh/onefetch"
|
|
|
|
|
|
|
|
[workspace]
|
|
|
|
members = ["ascii", "image", "manifest"]
|
|
|
|
|
|
|
|
[workspace.dependencies]
|
|
|
|
owo-colors = "3.5.0"
|
|
|
|
anyhow = "1.0"
|
2024-05-04 18:56:42 +00:00
|
|
|
clap = { version = "4.5.4", features = ["derive"] }
|
2024-03-17 11:10:32 +00:00
|
|
|
image = "0.24.9"
|
|
|
|
strum = { version = "0.25.0", features = ["derive"] }
|
|
|
|
|
2018-09-14 22:56:14 +00:00
|
|
|
[package]
|
2023-08-11 21:46:06 +00:00
|
|
|
authors.workspace = true
|
|
|
|
edition.workspace = true
|
|
|
|
version.workspace = true
|
|
|
|
license.workspace = true
|
|
|
|
repository.workspace = true
|
2021-10-24 12:04:08 +00:00
|
|
|
categories = ["command-line-utilities"]
|
2022-10-23 10:25:01 +00:00
|
|
|
description = "Command-line Git information tool"
|
2022-11-27 22:50:39 +00:00
|
|
|
exclude = ["docs/vercel/*"]
|
2022-08-25 16:16:19 +00:00
|
|
|
keywords = ["git", "cli", "terminal"]
|
2018-09-14 22:56:14 +00:00
|
|
|
name = "onefetch"
|
2022-12-03 18:35:15 +00:00
|
|
|
homepage = "https://onefetch.dev"
|
2024-03-17 10:58:54 +00:00
|
|
|
rust-version = "1.74.1"
|
2018-09-14 22:56:14 +00:00
|
|
|
|
2023-08-11 21:46:06 +00:00
|
|
|
[dependencies]
|
|
|
|
anyhow.workspace = true
|
2022-08-05 21:14:55 +00:00
|
|
|
askalono = "0.4.6"
|
2024-05-04 18:57:30 +00:00
|
|
|
byte-unit = "5.1.4"
|
2024-05-04 20:06:07 +00:00
|
|
|
bytecount = "0.6.8"
|
2023-08-11 21:46:06 +00:00
|
|
|
clap.workspace = true
|
2024-05-04 18:56:42 +00:00
|
|
|
clap_complete = "4.5.2"
|
2024-05-04 20:25:45 +00:00
|
|
|
crossbeam-channel = "0.5.12"
|
2024-05-22 18:23:21 +00:00
|
|
|
gix = { version = "0.63.0", default-features = false, features = [
|
2023-12-13 20:23:13 +00:00
|
|
|
"max-performance-safe",
|
|
|
|
"blob-diff",
|
|
|
|
"mailmap",
|
|
|
|
"index",
|
2024-03-16 22:44:29 +00:00
|
|
|
"status"
|
2022-08-25 16:16:19 +00:00
|
|
|
] }
|
2024-02-07 09:38:38 +00:00
|
|
|
gix-features = { version = "0.38.0", features = ["zlib-ng"] }
|
2023-12-08 18:26:43 +00:00
|
|
|
globset = "0.4.14"
|
2023-10-31 17:37:49 +00:00
|
|
|
human-panic = "1.2.1"
|
2023-08-11 21:46:06 +00:00
|
|
|
image.workspace = true
|
2022-12-12 21:13:17 +00:00
|
|
|
num-format = "0.4.4"
|
2023-11-29 14:45:54 +00:00
|
|
|
onefetch-ascii = { path = "ascii", version = "2.19.0" }
|
|
|
|
onefetch-image = { path = "image", version = "2.19.0" }
|
|
|
|
onefetch-manifest = { path = "manifest", version = "2.19.0" }
|
2023-08-11 21:46:06 +00:00
|
|
|
owo-colors.workspace = true
|
2024-05-04 20:25:16 +00:00
|
|
|
regex = "1.10.4"
|
2023-03-13 21:28:48 +00:00
|
|
|
serde = "1.0"
|
|
|
|
serde_json = "1.0"
|
2024-05-04 18:58:58 +00:00
|
|
|
serde_yaml = "0.9.34"
|
2022-06-19 21:24:34 +00:00
|
|
|
# TODO With the new value parsers, we're really close to being able to eliminate
|
|
|
|
# the strum dependency
|
2023-08-11 21:46:06 +00:00
|
|
|
strum.workspace = true
|
2024-05-04 20:06:34 +00:00
|
|
|
time = { version = "0.3.36", features = ["formatting"] }
|
2022-08-25 16:16:19 +00:00
|
|
|
time-humanize = { version = "0.1.3", features = ["time"] }
|
2021-03-15 21:52:07 +00:00
|
|
|
tokei = "12.1.2"
|
2022-12-30 20:23:38 +00:00
|
|
|
typetag = "0.2"
|
gix upgrade and optimizations (#1081)
* upgrade to latest gix v0.46 and make use of free traversal state.
The latest improvements make more data available during commit iteration,
which makes some improvements possible.
Doing so potentially saves some time, even though it's not visible in practice.
* change: bot commits now provide their commit time to first/most-recent commit information.
In practice, this change is unlikely to be noticeable, especially since `--no-bots` is not enabled by default.
However, if it is, bot commits will now contribute to the most recent commit times and the first commit times,
which will help if the only commit is a bot commit.
It also helps with allowing an upcoming multi-threaded implementation that leverages the commit-graph which in
turn will greatly speed up information retrieval in large repositories.
* refactor retrieval of commit graph information to make output clear
This is in preparation for creating a multi-threaded version of it.
* refactor retrieval of commit graph information to make output clear
This is in preparation for creating a multi-threaded version of it.
* refactoring
- Extrat commit graph traversal logic out of CommitMetrics's constructor
- renaming and simplified logic
* minor
* cargo fmt
* remove is_shallow property from GitMetrics
* Single thread for churn and author summary on main thread
* process author sig in seperate thread
* revert
* refactor
* unify logic to update number of commits by author.
More notes related to the `use_commit_graph()` call:
I was thinking about this API for a while, and it's the easiest way to configure this even though it seems redundant. Let me explain, maybe you can find a better solution.
In an even more recent version, `use_commit_graph()` doesn't default to `true`, but defaults to the value of `core.commitGraph`, which in turn defaults to true. We, however, always want to use the commitgraph, under the condition that we can use enough threads *and* actually have a commit-graph.
Now, one would think that `with_commit_graph` is enough to get what we want, but since `use_commit_graph` generally defaults to `true` under the hood it would make another attempt to open the commit-graph, even though there might not be one. This leads to the commit-graph detection to be run twice in the case there is none. Thus we explicitly set our verdict in `use_commit_graph` to avoid that kind of work.
Does it matter, you might ask? Probably not on today's SSDs, a few `stat` calls don't matter, so if you want, you can remove the `use_commit_graph` call. By default, I want an API that allows to avoid any waste, which is why it's implemented that way.
----
More notes related to the overcommit of threads
There isn't really a such a thing like exhausting threads, but indeed this implementation will overcommit a little bit for N threads:
* N threads for author computation (author)
* 1 thread for commit-iteration and author aggregation (aggregator)
* 1 threads for churn computation (churn)
The aggregator thread has to wait for (author) threads and won't be busy doing its work - thanks to the commit-graph these walks are very fast. It won't actually consume much CPU.
The churn thread is the one that runs just as hot if not hotter than the author threads, and I intend to let these contend a little as typically a little bit of over-commit eeks out a little more performance in practice. This is due to IO still playing a role here and once a thread is blocked, it's good to have a choice of more threads to run. Further, the `churn` thread is operating on a best-effort basis so to me its fine to drown it out a little, if the OS decides to do that, but in turn it gets a little additional time while the author threads are joined, so it should even out.
Fearless concurrency is fun :).
* explicitly call use_commit_graph and with_commit_graph
---------
Co-authored-by: o2sh <ossama-hjaji@live.fr>
2023-06-13 21:35:15 +00:00
|
|
|
parking_lot = "0.12"
|
2020-12-09 23:21:43 +00:00
|
|
|
|
2022-11-12 11:21:41 +00:00
|
|
|
[dev-dependencies]
|
2023-06-14 07:33:40 +00:00
|
|
|
criterion = "0.5.1"
|
2024-01-09 16:45:55 +00:00
|
|
|
gix-testtools = "0.13.0"
|
2024-05-22 18:25:06 +00:00
|
|
|
insta = { version = "1.39.0", features = ["json", "redactions"] }
|
2023-07-08 14:16:01 +00:00
|
|
|
pretty_assertions = "1.4.0"
|
2024-05-04 19:16:07 +00:00
|
|
|
rstest = "0.19.0"
|
2023-01-01 09:45:59 +00:00
|
|
|
|
|
|
|
[[bench]]
|
|
|
|
name = "repo"
|
|
|
|
harness = false
|
2020-09-04 12:50:49 +00:00
|
|
|
|
2022-07-09 09:08:49 +00:00
|
|
|
[build-dependencies]
|
|
|
|
lazy_static = "1"
|
|
|
|
regex = "1"
|
|
|
|
serde_json = "1"
|
2022-08-05 20:41:00 +00:00
|
|
|
serde_yaml = "0.9"
|
2022-07-09 09:08:49 +00:00
|
|
|
tera = { version = "1", default-features = false }
|
2020-10-26 14:25:11 +00:00
|
|
|
|
2022-11-27 17:42:55 +00:00
|
|
|
[target.'cfg(windows)'.build-dependencies]
|
|
|
|
winres = "0.1"
|
|
|
|
|
2022-11-12 11:21:41 +00:00
|
|
|
[target.'cfg(windows)'.dependencies]
|
2022-12-30 20:39:38 +00:00
|
|
|
enable-ansi-support = "0.2.1"
|
2022-11-12 11:21:41 +00:00
|
|
|
|
2020-10-26 14:25:11 +00:00
|
|
|
[features]
|
2020-11-04 17:16:51 +00:00
|
|
|
fail-on-deprecated = []
|