576bdc3c4e7e94277f769ece3a0f6b654e79f41a
   1#!/bin/sh
   2
   3test_description='Tests multi-threaded lazy_init_name_hash'
   4. ./perf-lib.sh
   5
   6test_perf_large_repo
   7test_checkout_worktree
   8
   9test_expect_success 'verify both methods build the same hashmaps' '
  10        test-lazy-init-name-hash --dump --single >out.single &&
  11        test-lazy-init-name-hash --dump --multi >out.multi &&
  12        sort <out.single >sorted.single &&
  13        sort <out.multi >sorted.multi &&
  14        test_cmp sorted.single sorted.multi
  15'
  16
  17test_expect_success 'multithreaded should be faster' '
  18        test-lazy-init-name-hash --perf >out.perf
  19'
  20
  21test_done