Merge branch 'develop' into tvOS-targets

This commit is contained in:
yury 2015-09-28 23:04:32 +03:00
commit ec4dd7ef5e
4 changed files with 6 additions and 16 deletions

View File

@ -131,7 +131,9 @@ extension ObservableType {
/**
Repeats the source observable sequence the specified number of times in case of an error or until it successfully terminates.
- parameter maxAttemptCount: Number of times to repeat the sequence.
If you encounter an error and want it to retry once, then you must use `retry(2)`
- parameter maxAttemptCount: Maximum number of times to repeat the sequence.
- returns: An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully.
*/
public func retry(maxAttemptCount: Int)

View File

@ -32,7 +32,7 @@ func measureTime(@noescape work: () -> ()) -> UInt64 {
}
let timeInNano = (mach_absolute_time() - start) * UInt64(timebaseInfo.numer) / UInt64(timebaseInfo.denom)
return approxValuePerIteration(timeInNano) / 1000
return approxValuePerIteration(timeInNano) / UInt64(NumberOfIterations)
}
func measureMemoryUsage(@noescape work: () -> ()) -> (bytesAllocated: UInt64, allocations: UInt64) {

View File

@ -199,7 +199,6 @@
C84B8FC11B89D0D500C9CCCF /* BagTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BagTest.swift; sourceTree = "<group>"; };
C85F4E421B7F70EA00A866C7 /* CompositeObserverTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CompositeObserverTest.swift; sourceTree = "<group>"; };
C8633AE41B0A9FF300375D60 /* KVOObservableTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KVOObservableTests.swift; sourceTree = "<group>"; };
C868D0EF1BB75EA1003D1474 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; };
C868D0F81BB76A29003D1474 /* PerformanceTools.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PerformanceTools.swift; sourceTree = "<group>"; };
C868D1091BB950D3003D1474 /* PerformanceTests.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PerformanceTests.app; sourceTree = BUILT_PRODUCTS_DIR; };
C868D10B1BB950D4003D1474 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; };
@ -270,7 +269,6 @@
C8A468CC1B8A897800BF917B /* RxCocoa.framework */,
C836EA001B8A76A900AB941D /* RxSwift.framework */,
C81108221AF50E11001C13E4 /* Tests */,
C868D0EE1BB75EA1003D1474 /* PerformanceTests */,
C868D10A1BB950D4003D1474 /* PerformanceTests */,
C81108211AF50E11001C13E4 /* Products */,
);
@ -400,14 +398,6 @@
path = Tests;
sourceTree = "<group>";
};
C868D0EE1BB75EA1003D1474 /* PerformanceTests */ = {
isa = PBXGroup;
children = (
C868D0EF1BB75EA1003D1474 /* main.swift */,
);
path = PerformanceTests;
sourceTree = "<group>";
};
C868D10A1BB950D4003D1474 /* PerformanceTests */ = {
isa = PBXGroup;
children = (

View File

@ -57,8 +57,6 @@ func registerMallocHooks() {
assert(Int(count) <= proxies.count)
let defaultZone = malloc_default_zone()
for i in 0 ..< Int(count) {
let zoneArray = zones.advancedBy(i)
let name = malloc_get_zone_name(zoneArray.memory)
@ -72,7 +70,7 @@ func registerMallocHooks() {
let protectSize = vm_size_t(sizeof(malloc_zone_t)) * vm_size_t(count)
if zone.version >= 8 {
if true {
let addressPointer = UnsafeMutablePointer<vm_address_t>(zoneArray)
let res = vm_protect(mach_task_self_, addressPointer.memory, protectSize, 0, PROT_READ | PROT_WRITE)
assert(res == 0)
@ -80,7 +78,7 @@ func registerMallocHooks() {
zoneArray.memory.memory = zone
if defaultZone.memory.version == 8 {
if true {
let res = vm_protect(mach_task_self_, _zones.memory, protectSize, 0, PROT_READ)
assert(res == 0)
}