use of com.google.copybara.profiler.Profiler in project copybara by google.
the class GitMirrorTest method testMirror.
@Test
public void testMirror() throws Exception {
RecordingListener recordingCallback = new RecordingListener();
Profiler profiler = new Profiler(new FakeTicker());
profiler.init(ImmutableList.of(recordingCallback));
options.general.withProfiler(profiler);
Migration mirror = createMirrorObj();
mirror.run(workdir, ImmutableList.of());
String orig = originRepo.git(originRepo.getGitDir(), "show-ref").getStdout();
String dest = destRepo.git(destRepo.getGitDir(), "show-ref").getStdout();
assertThat(dest).isEqualTo(orig);
recordingCallback.assertMatchesNext(EventType.START, "//copybara").assertMatchesNext(EventType.START, "//copybara/run/default").assertMatchesNext(EventType.START, "//copybara/run/default/fetch").assertMatchesNext(EventType.END, "//copybara/run/default/fetch").assertMatchesNext(EventType.START, "//copybara/run/default/push").assertMatchesNext(EventType.END, "//copybara/run/default/push").assertMatchesNext(EventType.END, "//copybara/run/default");
}
use of com.google.copybara.profiler.Profiler in project copybara by google.
the class RemoteArchiveOriginTest method setUp.
@Before
public void setUp() throws Exception {
workdir = Files.createTempDirectory("workdir");
ticker = new FakeTicker().setAutoIncrementStep(1, TimeUnit.MILLISECONDS);
profiler = new Profiler(ticker);
remoteFileOptions = new RemoteFileOptions();
}
Aggregations