Collect metrics over lifetime of working copies (#1591)

Capture metrics about the lifetime of working copies used, for example, by the merge and modify commands. Working copies are internal repository clones that can place a large load on the server. Therefore, these metrics can be helpful in identifying sources of large server load.

Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
This commit is contained in:
Eduard Heimbuch
2021-03-24 13:03:20 +01:00
committed by GitHub
parent 3ec499d22c
commit c5720b36b5
17 changed files with 105 additions and 30 deletions

View File

@@ -24,6 +24,7 @@
package sonia.scm.repository.spi;
import io.micrometer.core.instrument.MeterRegistry;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.transport.ScmTransportProtocol;
import sonia.scm.repository.GitWorkingCopyFactory;
@@ -37,8 +38,8 @@ import java.io.File;
public class SimpleGitWorkingCopyFactory extends SimpleWorkingCopyFactory<Repository, Repository, GitContext> implements GitWorkingCopyFactory {
@Inject
public SimpleGitWorkingCopyFactory(WorkingCopyPool workdirProvider) {
super(workdirProvider);
public SimpleGitWorkingCopyFactory(WorkingCopyPool workdirProvider, MeterRegistry meterRegistry) {
super(workdirProvider, meterRegistry);
}
@Override