Permalink
Browse files

More fiddling with `StressTests`.

No impact on the real code.
  • Loading branch information...
1 parent ab76e52 commit ac7f7f2e87487d326b935826c016bf23314db910 @jaketmp jaketmp committed Mar 12, 2012
Showing with 14 additions and 6 deletions.
  1. +13 −5 StressTests/main.m
  2. +1 −1 epub.xcodeproj/xcshareddata/xcschemes/StressTests.xcscheme
View
18 StressTests/main.m
@@ -26,14 +26,14 @@ int main(int argc, const char * argv[])
// Using 'NSASCIIStringEncoding' here is suspect...
NSString *epubPath = [[NSString alloc] initWithCString:argv[1] encoding:NSASCIIStringEncoding];
- int innerLoop = 1000;
- int outerLoop = 10000;
+ int innerLoop = 100;
+ int outerLoop = 7;
// Two loops so we can periodicly emplty the autorelease pool
- for (int i; i < outerLoop; i++) {
+ for (int i = 0; i < outerLoop; i++) {
NSAutoreleasePool *loopPool = [[NSAutoreleasePool alloc] init];
- for (int j; j < innerLoop; j++) {
+ for (int j = 0; j < innerLoop; j++) {
JTPepub *epub = [[JTPepub alloc] initWithFile:epubPath];
NSString *title = [epub title];
@@ -50,12 +50,20 @@ int main(int argc, const char * argv[])
NSString *drm = [epub drm];
NSMutableArray *language = [epub language];
+
+ [epub release];
+
}
[loopPool release];
- }
+ NSLog(@"outer iteration %i", i);
+ }
+ [epubPath release];
}
+
+
+ NSLog(@"done");
return 0;
}
View
2 epub.xcodeproj/xcshareddata/xcschemes/StressTests.xcscheme
@@ -69,7 +69,7 @@
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
- buildConfiguration = "Release"
+ buildConfiguration = "Debug"
debugDocumentVersioning = "YES">
<BuildableProductRunnable>
<BuildableReference

0 comments on commit ac7f7f2

Please sign in to comment.