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:
+10
-2
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user