#include "pathspec.h"
#include "dir.h"
#include "fsmonitor.h"
+#include "config.h"
#include "progress.h"
#ifdef NO_PTHREADS
{
int threads, i, work, offset;
struct thread_data data[MAX_PARALLEL];
- uint64_t start = getnanotime();
struct progress_data pd;
if (!core_preload_index)
return;
threads = index->cache_nr / THREAD_COST;
- if ((index->cache_nr > 1) && (threads < 2) && getenv("GIT_FORCE_PRELOAD_TEST"))
+ if ((index->cache_nr > 1) && (threads < 2) && git_env_bool("GIT_TEST_PRELOAD_INDEX", 0))
threads = 2;
if (threads < 2)
return;
+ trace_performance_enter();
if (threads > MAX_PARALLEL)
threads = MAX_PARALLEL;
offset = 0;
}
stop_progress(&pd.progress);
- trace_performance_since(start, "preload index");
+ trace_performance_leave("preload index");
}
#endif