StarredChangesUtil: Pass number of labels to TraceTimer, not the labels

The actual star labels are not interesting for tracing the time that
updating the star labels takes. We only need to know how many star
labels are written.

Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: I1ae2edefcdee013d0c35d294c6ff84dcb0f56585
This commit is contained in:
Edwin Kempin
2019-06-26 14:28:39 +02:00
parent d0019c4e06
commit 1d445f6c0d

View File

@@ -450,7 +450,8 @@ public class StarredChangesUtil {
Repository repo, String refName, ObjectId oldObjectId, Collection<String> labels)
throws IOException, InvalidLabelsException {
try (TraceTimer traceTimer =
TraceContext.newTimer("Update star labels", "ref", refName, "labels", labels);
TraceContext.newTimer(
"Update star labels", "ref", refName, "labelCount", labels.size());
RevWalk rw = new RevWalk(repo)) {
RefUpdate u = repo.updateRef(refName);
u.setExpectedOldObjectId(oldObjectId);