From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id A237820970 for ; Tue, 11 Apr 2017 20:08:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753074AbdDKUIQ (ORCPT ); Tue, 11 Apr 2017 16:08:16 -0400 Received: from siwi.pair.com ([209.68.5.199]:35144 "EHLO siwi.pair.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752580AbdDKUIP (ORCPT ); Tue, 11 Apr 2017 16:08:15 -0400 Received: from jeffhost-ubuntu.reddog.microsoft.com (unknown [65.55.188.213]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by siwi.pair.com (Postfix) with ESMTPSA id 9C4D6844ED; Tue, 11 Apr 2017 16:08:13 -0400 (EDT) From: git@jeffhostetler.com To: git@vger.kernel.org Cc: gitster@pobox.com, peff@peff.net, Jeff Hostetler Subject: [PATCH v4 2/2] p0005-status: time status on very large repo Date: Tue, 11 Apr 2017 20:08:02 +0000 Message-Id: <20170411200802.31638-3-git@jeffhostetler.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170411200802.31638-1-git@jeffhostetler.com> References: <20170411200802.31638-1-git@jeffhostetler.com> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Jeff Hostetler Signed-off-by: Jeff Hostetler --- t/perf/p0005-status.sh | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100755 t/perf/p0005-status.sh diff --git a/t/perf/p0005-status.sh b/t/perf/p0005-status.sh new file mode 100755 index 0000000..0469aee --- /dev/null +++ b/t/perf/p0005-status.sh @@ -0,0 +1,51 @@ +#!/bin/sh +## +## This test measures the performance of various read-tree +## and status operations. It is primarily interested in +## the algorithmic costs of index operations and recursive +## tree traversal -- and NOT disk I/O on thousands of files. + +test_description="Tests performance of read-tree" + +. ./perf-lib.sh + +test_perf_default_repo + +## If the test repo was generated by ./repos/many-files.sh +## then we know something about the data shape and branches, +## so we can isolate testing to the ballast-related commits +## and setup sparse-checkout so we don't have to populate +## the ballast files and directories. +## +## Otherwise, we make some general assumptions about the +## repo and consider the entire history of the current +## branch to be the ballast. + +git branch | grep p0006-ballast >/dev/null 2>&1 +synthetic=$? +if test "$synthetic" = 0 +then + echo Assuming synthetic repo from many-files.sh + git branch br_base master + git branch br_ballast p0006-ballast + echo '/*' >.git/info/sparse-checkout + echo '!ballast/*' >>.git/info/sparse-checkout + git config --local core.sparsecheckout 1 +else + echo Assuming non-synthetic repo... + git branch br_base $(git rev-list HEAD | tail -n 1) + git branch br_ballast HEAD +fi + +test_expect_success 'setup' ' + git checkout -q br_ballast +' + +nr_files=$(git ls-files | wc -l) + +test_perf "read-tree status br_ballast ($nr_files)" ' + git read-tree HEAD && + git status +' + +test_done -- 2.9.3