feat(server): add tracing spans and caching to archive and blame services

- Add tracing spans with repo labels for archive and blame operations
- Implement caching for archive list entries when using OID selectors
- Implement caching for blame operations when using OID selectors
- Add detailed
This commit is contained in:
zhenyi
2026-06-04 15:33:16 +08:00
parent 729604f13b
commit cc202d6d1f
41 changed files with 2400 additions and 1067 deletions
+10 -2
View File
@@ -1,4 +1,12 @@
use gitks::bare::GitBare;
use gitks::server::GitksService;
/// Create a GitksService with a temp directory as repo_prefix
pub fn setup_service(dir: &std::path::Path) -> GitksService {
GitksService {
repo_prefix: dir.to_path_buf(),
}
}
pub fn run_git(work_dir: &std::path::Path, args: &[&str]) -> duct::Expression {
duct::cmd("git", {
@@ -96,7 +104,7 @@ pub fn setup_bare_repo() -> (tempfile::TempDir, GitBare) {
.run()
.expect("set HEAD to main");
(dir, GitBare { bare_dir })
(dir, GitBare::new(bare_dir))
}
pub fn setup_bare_repo_with_conflict() -> (tempfile::TempDir, GitBare) {
@@ -163,5 +171,5 @@ pub fn setup_bare_repo_with_conflict() -> (tempfile::TempDir, GitBare) {
.run()
.expect("set HEAD to main");
(dir, GitBare { bare_dir })
(dir, GitBare::new(bare_dir))
}