Skip to content

Commit 3d64d83

Browse files
committed
Create a new SpeedTest target
This adds a new target 'SpeedTest', which just loads in a repository and displays how long it takes to load the revision. This is handy for testing the speed of the revwalking mechanism
1 parent cef35ac commit 3d64d83

File tree

6 files changed

+222
-4
lines changed

6 files changed

+222
-4
lines changed

GitX.xcodeproj/project.pbxproj

+153-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 44;
6+
objectVersion = 45;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -55,6 +55,24 @@
5555
F57CC4410E05E496000472E2 /* PBGitWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = F57CC4400E05E496000472E2 /* PBGitWindowController.m */; };
5656
F580E6AE0E733276009E2D3F /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F580E6AD0E733276009E2D3F /* Sparkle.framework */; };
5757
F580E6B10E73328C009E2D3F /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = F580E6AD0E733276009E2D3F /* Sparkle.framework */; };
58+
F5886A160ED5D3490066E74C /* speedtest.m in Sources */ = {isa = PBXBuildFile; fileRef = F5886A0A0ED5D27A0066E74C /* speedtest.m */; };
59+
F5886A170ED5D34F0066E74C /* PBGitRepository.m in Sources */ = {isa = PBXBuildFile; fileRef = F5945E160E02B0C200706420 /* PBGitRepository.m */; };
60+
F5886A180ED5D3540066E74C /* PBGitRevList.m in Sources */ = {isa = PBXBuildFile; fileRef = F5FF4E170E0829C20006317A /* PBGitRevList.m */; };
61+
F5886A190ED5D3560066E74C /* PBGitRef.m in Sources */ = {isa = PBXBuildFile; fileRef = F5C007740E731B48007B84B2 /* PBGitRef.m */; };
62+
F5886A1B0ED5D37C0066E74C /* NSFileHandleExt.m in Sources */ = {isa = PBXBuildFile; fileRef = F56524B90E02D22D00F03B52 /* NSFileHandleExt.m */; };
63+
F5886A1C0ED5D37C0066E74C /* PBEasyPipe.m in Sources */ = {isa = PBXBuildFile; fileRef = F57CC3900E05DDF2000472E2 /* PBEasyPipe.m */; };
64+
F5886A1D0ED5D37C0066E74C /* PBEasyFS.m in Sources */ = {isa = PBXBuildFile; fileRef = F5DFFA6B0E075D8800617813 /* PBEasyFS.m */; };
65+
F5886A1E0ED5D3880066E74C /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
66+
F5886A260ED5D4870066E74C /* PBGitGrapher.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5FF4E790E082E440006317A /* PBGitGrapher.mm */; };
67+
F5886A270ED5D4870066E74C /* PBGitRevisionCell.m in Sources */ = {isa = PBXBuildFile; fileRef = F50FE0E20E07BE9600854FCD /* PBGitRevisionCell.m */; };
68+
F5886A280ED5D4870066E74C /* PBGitGraphLine.m in Sources */ = {isa = PBXBuildFile; fileRef = F56CC7280E65E0AD004307B4 /* PBGitGraphLine.m */; };
69+
F5886A290ED5D4870066E74C /* PBGraphCellInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = F56CC7310E65E0E5004307B4 /* PBGraphCellInfo.m */; };
70+
F5886A2A0ED5D4870066E74C /* PBGitLane.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5C6F68C0E65FF9300478D97 /* PBGitLane.mm */; };
71+
F5886A310ED5D54C0066E74C /* PBGitConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 93FCCBA80EA8AF450061B02B /* PBGitConfig.m */; };
72+
F5886A320ED5D5510066E74C /* PBGitCommit.m in Sources */ = {isa = PBXBuildFile; fileRef = F56524EF0E02D45200F03B52 /* PBGitCommit.m */; };
73+
F5886A330ED5D5580066E74C /* PBGitRevSpecifier.m in Sources */ = {isa = PBXBuildFile; fileRef = F53FF2040E7ABB5300389171 /* PBGitRevSpecifier.m */; };
74+
F5886A340ED5D55D0066E74C /* PBGitBinary.m in Sources */ = {isa = PBXBuildFile; fileRef = F53C4DF60E97FC630022AD59 /* PBGitBinary.m */; };
75+
F5886A360ED5D56E0066E74C /* PBGitTree.m in Sources */ = {isa = PBXBuildFile; fileRef = F56174560E058893001DCD79 /* PBGitTree.m */; };
5876
F59116E60E843BB50072CCB1 /* PBGitCommitView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F59116E50E843BB50072CCB1 /* PBGitCommitView.xib */; };
5977
F59116E90E843BCB0072CCB1 /* PBGitCommitController.m in Sources */ = {isa = PBXBuildFile; fileRef = F59116E80E843BCB0072CCB1 /* PBGitCommitController.m */; };
6078
F593DF780E9E636C003A8559 /* PBFileChangesTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = F593DF770E9E636C003A8559 /* PBFileChangesTableView.m */; };
@@ -181,6 +199,9 @@
181199
F57CC43F0E05E496000472E2 /* PBGitWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitWindowController.h; sourceTree = "<group>"; };
182200
F57CC4400E05E496000472E2 /* PBGitWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitWindowController.m; sourceTree = "<group>"; };
183201
F580E6AD0E733276009E2D3F /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Sparkle.framework; sourceTree = "<group>"; };
202+
F5886A0A0ED5D27A0066E74C /* speedtest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = speedtest.m; sourceTree = "<group>"; };
203+
F5886A100ED5D33D0066E74C /* SpeedTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SpeedTest.app; sourceTree = BUILT_PRODUCTS_DIR; };
204+
F5886A120ED5D33D0066E74C /* SpeedTest-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SpeedTest-Info.plist"; sourceTree = "<group>"; };
184205
F59116E50E843BB50072CCB1 /* PBGitCommitView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PBGitCommitView.xib; sourceTree = "<group>"; };
185206
F59116E70E843BCB0072CCB1 /* PBGitCommitController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitCommitController.h; sourceTree = "<group>"; };
186207
F59116E80E843BCB0072CCB1 /* PBGitCommitController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitCommitController.m; sourceTree = "<group>"; };
@@ -248,6 +269,14 @@
248269
);
249270
runOnlyForDeploymentPostprocessing = 0;
250271
};
272+
F5886A0E0ED5D33D0066E74C /* Frameworks */ = {
273+
isa = PBXFrameworksBuildPhase;
274+
buildActionMask = 2147483647;
275+
files = (
276+
F5886A1E0ED5D3880066E74C /* Cocoa.framework in Frameworks */,
277+
);
278+
runOnlyForDeploymentPostprocessing = 0;
279+
};
251280
/* End PBXFrameworksBuildPhase section */
252281

253282
/* Begin PBXGroup section */
@@ -285,13 +314,15 @@
285314
children = (
286315
8D1107320486CEB800E47090 /* GitX.app */,
287316
913D5E490E55644600CECEA2 /* gitx */,
317+
F5886A100ED5D33D0066E74C /* SpeedTest.app */,
288318
);
289319
name = Products;
290320
sourceTree = "<group>";
291321
};
292322
29B97314FDCFA39411CA2CEA /* GitTest */ = {
293323
isa = PBXGroup;
294324
children = (
325+
F5886A080ED5D26B0066E74C /* SpeedTest */,
295326
913D5E420E5563FD00CECEA2 /* cli */,
296327
F57CC43E0E05E472000472E2 /* Aux */,
297328
F57CC3850E05DDC1000472E2 /* Controllers */,
@@ -303,6 +334,7 @@
303334
29B97317FDCFA39411CA2CEA /* Resources */,
304335
29B97323FDCFA39411CA2CEA /* Frameworks */,
305336
19C28FACFE9D520D11CA2CBB /* Products */,
337+
F5886A120ED5D33D0066E74C /* SpeedTest-Info.plist */,
306338
);
307339
name = GitTest;
308340
sourceTree = "<group>";
@@ -441,6 +473,14 @@
441473
name = Aux;
442474
sourceTree = "<group>";
443475
};
476+
F5886A080ED5D26B0066E74C /* SpeedTest */ = {
477+
isa = PBXGroup;
478+
children = (
479+
F5886A0A0ED5D27A0066E74C /* speedtest.m */,
480+
);
481+
name = SpeedTest;
482+
sourceTree = "<group>";
483+
};
444484
F5B161BB0EAB6E0C005A1DE1 /* Diff */ = {
445485
isa = PBXGroup;
446486
children = (
@@ -571,20 +611,38 @@
571611
productReference = 913D5E490E55644600CECEA2 /* gitx */;
572612
productType = "com.apple.product-type.tool";
573613
};
614+
F5886A0F0ED5D33D0066E74C /* SpeedTest */ = {
615+
isa = PBXNativeTarget;
616+
buildConfigurationList = F5886A150ED5D33E0066E74C /* Build configuration list for PBXNativeTarget "SpeedTest" */;
617+
buildPhases = (
618+
F5886A0C0ED5D33D0066E74C /* Resources */,
619+
F5886A0D0ED5D33D0066E74C /* Sources */,
620+
F5886A0E0ED5D33D0066E74C /* Frameworks */,
621+
);
622+
buildRules = (
623+
);
624+
dependencies = (
625+
);
626+
name = SpeedTest;
627+
productName = SpeedTest;
628+
productReference = F5886A100ED5D33D0066E74C /* SpeedTest.app */;
629+
productType = "com.apple.product-type.application";
630+
};
574631
/* End PBXNativeTarget section */
575632

576633
/* Begin PBXProject section */
577634
29B97313FDCFA39411CA2CEA /* Project object */ = {
578635
isa = PBXProject;
579636
buildConfigurationList = 26FC0A880875C7B200E6366F /* Build configuration list for PBXProject "GitX" */;
580-
compatibilityVersion = "Xcode 3.0";
637+
compatibilityVersion = "Xcode 3.1";
581638
hasScannedForEncodings = 1;
582639
mainGroup = 29B97314FDCFA39411CA2CEA /* GitTest */;
583640
projectDirPath = "";
584641
projectRoot = "";
585642
targets = (
586643
8D1107260486CEB800E47090 /* GitX */,
587644
913D5E480E55644600CECEA2 /* cli tool */,
645+
F5886A0F0ED5D33D0066E74C /* SpeedTest */,
588646
);
589647
};
590648
/* End PBXProject section */
@@ -615,6 +673,13 @@
615673
);
616674
runOnlyForDeploymentPostprocessing = 0;
617675
};
676+
F5886A0C0ED5D33D0066E74C /* Resources */ = {
677+
isa = PBXResourcesBuildPhase;
678+
buildActionMask = 2147483647;
679+
files = (
680+
);
681+
runOnlyForDeploymentPostprocessing = 0;
682+
};
618683
/* End PBXResourcesBuildPhase section */
619684

620685
/* Begin PBXShellScriptBuildPhase section */
@@ -698,6 +763,30 @@
698763
);
699764
runOnlyForDeploymentPostprocessing = 0;
700765
};
766+
F5886A0D0ED5D33D0066E74C /* Sources */ = {
767+
isa = PBXSourcesBuildPhase;
768+
buildActionMask = 2147483647;
769+
files = (
770+
F5886A260ED5D4870066E74C /* PBGitGrapher.mm in Sources */,
771+
F5886A360ED5D56E0066E74C /* PBGitTree.m in Sources */,
772+
F5886A330ED5D5580066E74C /* PBGitRevSpecifier.m in Sources */,
773+
F5886A310ED5D54C0066E74C /* PBGitConfig.m in Sources */,
774+
F5886A270ED5D4870066E74C /* PBGitRevisionCell.m in Sources */,
775+
F5886A320ED5D5510066E74C /* PBGitCommit.m in Sources */,
776+
F5886A340ED5D55D0066E74C /* PBGitBinary.m in Sources */,
777+
F5886A280ED5D4870066E74C /* PBGitGraphLine.m in Sources */,
778+
F5886A290ED5D4870066E74C /* PBGraphCellInfo.m in Sources */,
779+
F5886A2A0ED5D4870066E74C /* PBGitLane.mm in Sources */,
780+
F5886A1B0ED5D37C0066E74C /* NSFileHandleExt.m in Sources */,
781+
F5886A1C0ED5D37C0066E74C /* PBEasyPipe.m in Sources */,
782+
F5886A1D0ED5D37C0066E74C /* PBEasyFS.m in Sources */,
783+
F5886A180ED5D3540066E74C /* PBGitRevList.m in Sources */,
784+
F5886A170ED5D34F0066E74C /* PBGitRepository.m in Sources */,
785+
F5886A190ED5D3560066E74C /* PBGitRef.m in Sources */,
786+
F5886A160ED5D3490066E74C /* speedtest.m in Sources */,
787+
);
788+
runOnlyForDeploymentPostprocessing = 0;
789+
};
701790
/* End PBXSourcesBuildPhase section */
702791

703792
/* Begin PBXTargetDependency section */
@@ -785,7 +874,7 @@
785874
GCC_WARN_ABOUT_RETURN_TYPE = YES;
786875
GCC_WARN_UNUSED_VARIABLE = YES;
787876
PREBINDING = NO;
788-
SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
877+
SDKROOT = macosx10.5;
789878
};
790879
name = Debug;
791880
};
@@ -800,7 +889,7 @@
800889
GCC_WARN_ABOUT_RETURN_TYPE = YES;
801890
GCC_WARN_UNUSED_VARIABLE = YES;
802891
PREBINDING = NO;
803-
SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
892+
SDKROOT = macosx10.5;
804893
};
805894
name = Release;
806895
};
@@ -849,6 +938,57 @@
849938
};
850939
name = Release;
851940
};
941+
F5886A130ED5D33E0066E74C /* Debug */ = {
942+
isa = XCBuildConfiguration;
943+
buildSettings = {
944+
ALWAYS_SEARCH_USER_PATHS = YES;
945+
CODE_SIGN_IDENTITY = "";
946+
COPY_PHASE_STRIP = NO;
947+
FRAMEWORK_SEARCH_PATHS = /System/Library/Frameworks;
948+
GCC_DYNAMIC_NO_PIC = NO;
949+
GCC_OPTIMIZATION_LEVEL = 2;
950+
GCC_PRECOMPILE_PREFIX_HEADER = YES;
951+
GCC_PREFIX_HEADER = GitX_Prefix.pch;
952+
INFOPLIST_FILE = "SpeedTest-Info.plist";
953+
INSTALL_PATH = "$(HOME)/Applications";
954+
OTHER_CFLAGS = "-DCLI";
955+
OTHER_LDFLAGS = (
956+
"-framework",
957+
Foundation,
958+
"-framework",
959+
Cocoa,
960+
);
961+
PREBINDING = NO;
962+
PRODUCT_NAME = SpeedTest;
963+
SDKROOT = macosx10.5;
964+
};
965+
name = Debug;
966+
};
967+
F5886A140ED5D33E0066E74C /* Release */ = {
968+
isa = XCBuildConfiguration;
969+
buildSettings = {
970+
ALWAYS_SEARCH_USER_PATHS = NO;
971+
CODE_SIGN_IDENTITY = "iPhone Developer";
972+
COPY_PHASE_STRIP = YES;
973+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
974+
GCC_ENABLE_FIX_AND_CONTINUE = NO;
975+
GCC_PRECOMPILE_PREFIX_HEADER = YES;
976+
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/UIKit.framework/Headers/UIKit.h";
977+
INFOPLIST_FILE = "SpeedTest-Info.plist";
978+
INSTALL_PATH = "$(HOME)/Applications";
979+
OTHER_LDFLAGS = (
980+
"-framework",
981+
Foundation,
982+
"-framework",
983+
UIKit,
984+
);
985+
PREBINDING = NO;
986+
PRODUCT_NAME = SpeedTest;
987+
SDKROOT = iphoneos2.0;
988+
ZERO_LINK = NO;
989+
};
990+
name = Release;
991+
};
852992
/* End XCBuildConfiguration section */
853993

854994
/* Begin XCConfigurationList section */
@@ -879,6 +1019,15 @@
8791019
defaultConfigurationIsVisible = 0;
8801020
defaultConfigurationName = Release;
8811021
};
1022+
F5886A150ED5D33E0066E74C /* Build configuration list for PBXNativeTarget "SpeedTest" */ = {
1023+
isa = XCConfigurationList;
1024+
buildConfigurations = (
1025+
F5886A130ED5D33E0066E74C /* Debug */,
1026+
F5886A140ED5D33E0066E74C /* Release */,
1027+
);
1028+
defaultConfigurationIsVisible = 0;
1029+
defaultConfigurationName = Release;
1030+
};
8821031
/* End XCConfigurationList section */
8831032
};
8841033
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;

PBEasyPipe.m

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ + (NSTask *) taskForCommand:(NSString *)cmd withArgs:(NSArray *)args inDir:(NSSt
2626

2727
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"Show Debug Messages"])
2828
NSLog(@"Starting command `%@ %@` in dir %@", cmd, [args componentsJoinedByString:@" "], dir);
29+
#ifdef CLI
30+
NSLog(@"Starting command `%@ %@` in dir %@", cmd, [args componentsJoinedByString:@" "], dir);
31+
#endif
2932

3033
NSPipe* pipe = [NSPipe pipe];
3134
task.standardOutput = pipe;

PBGitRepository.m

+5
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,10 @@ - (id) initWithURL: (NSURL*) path
136136

137137
// We don't want the window controller to display anything yet..
138138
// We'll leave that to the caller of this method.
139+
#ifndef CLI
139140
[self addWindowController:[[PBGitWindowController alloc] initWithRepository:self displayDefault:NO]];
141+
#endif
142+
140143
[self showWindows];
141144

142145
return self;
@@ -155,7 +158,9 @@ - (NSString*)displayName
155158
// Overridden to create our custom window controller
156159
- (void)makeWindowControllers
157160
{
161+
#ifndef CLI
158162
[self addWindowController: [[PBGitWindowController alloc] initWithRepository:self displayDefault:YES]];
163+
#endif
159164
}
160165

161166
- (NSWindowController *)windowController

SpeedTest-Info.plist

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>English</string>
7+
<key>CFBundleExecutable</key>
8+
<string>${EXECUTABLE_NAME}</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>com.yourcompany.${PRODUCT_NAME:identifier}</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundlePackageType</key>
14+
<string>APPL</string>
15+
<key>CFBundleSignature</key>
16+
<string>????</string>
17+
<key>CFBundleVersion</key>
18+
<string>1.0</string>
19+
<key>NSMainNibFile</key>
20+
<string>MainWindow</string>
21+
</dict>
22+
</plist>

speedtest.h

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//
2+
// speedtest.h
3+
// GitX
4+
//
5+
// Created by Pieter de Bie on 20-11-08.
6+
// Copyright 2008 Pieter de Bie. All rights reserved.
7+
//
8+
9+
#import <Cocoa/Cocoa.h>
10+
11+
12+
@interface speedtest : NSObject {
13+
14+
}
15+
16+
@end

speedtest.m

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
//
2+
// speedtest.m
3+
// GitX
4+
//
5+
// Created by Pieter de Bie on 20-11-08.
6+
// Copyright 2008 Pieter de Bie. All rights reserved.
7+
//
8+
9+
#import "speedtest.h"
10+
#import "PBGitRepository.h"
11+
#import "PBGitRevList.h"
12+
13+
int main()
14+
{
15+
PBGitRepository *repo = [[PBGitRepository alloc] initWithURL:[NSURL URLWithString:@"file:///Users/pieter/projects/git"]];
16+
PBGitRevList *revList = [[PBGitRevList alloc] initWithRepository:repo];
17+
PBGitRevSpecifier *revSpecifier = [[PBGitRevSpecifier alloc] initWithParameters:[NSArray arrayWithObject:@"master"]];
18+
19+
//[repo reloadRefs];
20+
[revList walkRevisionListWithSpecifier:revSpecifier];
21+
22+
return 0;
23+
}

0 commit comments

Comments
 (0)