Skip to content

Commit

Permalink
Merge branch 'main' into updatePackageDepedencies
Browse files Browse the repository at this point in the history
  • Loading branch information
freef4ll committed Jun 28, 2024
2 parents 3b887af + 6889229 commit f48541d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:

- name: Install semantic-release
run: |
npm install semantic-release conventional-changelog-conventionalcommits@v7 -D
npm install semantic-release@v24 conventional-changelog-conventionalcommits@v8 -D
npm list
- name: Release
env:
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ if macOSSPIBuild == false { // jemalloc always disable for macOSSPIBuild
print("Jemalloc disabled through environment variable.")
} else {
package.dependencies += [.package(url: "https://github.com/ordo-one/package-jemalloc", .upToNextMajor(from: "1.0.0"))]
dependencies += [.product(name: "jemalloc", package: "package-jemalloc")]
dependencies += [.product(name: "jemalloc", package: "package-jemalloc", condition: .when(platforms: [.macOS, .linux]))]
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
nsPerSchedulerTick = 1_000_000_000 / schedulerTicksPerSecond
}

#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(visionOS)
#if os(macOS)
fileprivate
func getProcInfo() -> proc_taskinfo {
var procTaskInfo = proc_taskinfo()
Expand Down Expand Up @@ -93,7 +93,7 @@
#endif

func startSampling(_: Int = 10_000) { // sample rate in microseconds
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(visionOS)
#if os(macOS)
let sampleSemaphore = DispatchSemaphore(value: 0)

DispatchQueue.global(qos: .userInitiated).async {
Expand Down Expand Up @@ -155,7 +155,7 @@
}

func stopSampling() {
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(visionOS)
#if os(macOS)
lock.withLock {
runState = .shuttingDown
}
Expand All @@ -168,7 +168,7 @@
}

func makeOperatingSystemStats() -> OperatingSystemStats { // swiftlint:disable:this function_body_length
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(visionOS)
#if os(macOS)
guard let metrics else {
return .init()
}
Expand Down Expand Up @@ -255,8 +255,12 @@
}

func makePerformanceCounters() -> PerformanceCounters {
#if os(macOS)
let performanceCounters = getRusage()
return .init(instructions: performanceCounters.ri_instructions)
#else
return .init()
#endif
}
}

Expand Down

0 comments on commit f48541d

Please sign in to comment.