Skip to content

Commit

Permalink
Memory usage
Browse files Browse the repository at this point in the history
  • Loading branch information
dani-gavrilov committed Nov 14, 2017
1 parent 62a45a4 commit 32eb077
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions GDPerformanceView-Swift.podspec
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Pod::Spec.new do |s|
s.name = "GDPerformanceView-Swift"
s.version = "1.3.1"
s.version = "1.3.2"
s.summary = "Shows FPS, CPU usage, app and iOS versions above the status bar and report FPS and CPU usage via delegate."
s.homepage = "https://github.com/dani-gavrilov/GDPerformanceView-Swift"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "Gavrilov Daniil" => "[email protected]" }
s.platform = :ios, "8.0"
s.ios.deployment_target = "8.0"
s.source = { :git => "https://github.com/dani-gavrilov/GDPerformanceView-Swift.git", :tag => "1.3.1" }
s.source = { :git => "https://github.com/dani-gavrilov/GDPerformanceView-Swift.git", :tag => "1.3.2" }
s.source_files = "GDPerformanceView-Swift/GDPerformanceMonitoring/*.swift"
s.frameworks = "UIKit", "Foundation", "QuartzCore"
s.requires_arc = true
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ internal class GDPerformanceView: UIWindow {
private func updateMonitoringLabel(fpsUsage: Int, cpuUsage: Float, memory: MemoryUsageTuple) {
let free = Float(memory.usedMemory) / Float(1024 * 1024)
let total = Float(memory.totalMemory) / Float(1024 * 1024)
let monitoringString = String(format: "FPS : %d, CPU : %.1f%%\nMemory used : %.1f, total : %.0f", fpsUsage, cpuUsage, free, total)
let monitoringString = String(format: "FPS : %d, CPU : %.1f%%\nmemory used : %.1f, total : %.0f", fpsUsage, cpuUsage, free, total)

self.monitoringTextLabel.text = monitoringString + self.versionsString
self.layoutTextLabel()
Expand Down Expand Up @@ -399,7 +399,7 @@ internal class GDPerformanceView: UIWindow {
let systemVersion = UIDevice.current.systemVersion

if !self.appVersionHidden && !self.deviceVersionHidden {
versionsString = "\napp v\(applicationVersion) (\(applicationBuild)) iOS v\(systemVersion)"
versionsString = "\napp v\(applicationVersion) (\(applicationBuild)), iOS v\(systemVersion)"
} else if !self.appVersionHidden {
versionsString = "\napp v\(applicationVersion) (\(applicationBuild))"
} else if !self.deviceVersionHidden {
Expand Down
2 changes: 1 addition & 1 deletion GDPerformanceView-Swift/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.3.1</string>
<string>1.3.2</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
Expand Down
2 changes: 1 addition & 1 deletion GDPerformanceView-iOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.3.1</string>
<string>1.3.2</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSPrincipalClass</key>
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Shows FPS, CPU usage, app and iOS versions above the status bar and report FPS and CPU usage via delegate.

[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-brightgreen.svg)](https://github.com/Carthage/Carthage)
[![Pod Version](https://img.shields.io/badge/Pod-1.3.1-6193DF.svg)](https://cocoapods.org/)
[![Pod Version](https://img.shields.io/badge/Pod-1.3.2-6193DF.svg)](https://cocoapods.org/)
![Swift Version](https://img.shields.io/badge/xCode-9.1+-blue.svg)
![Swift Version](https://img.shields.io/badge/iOS-8.0+-blue.svg)
![Swift Version](https://img.shields.io/badge/Swift-4.0+-orange.svg)
Expand All @@ -22,7 +22,7 @@ Simply add GDPerformanceMonitoring folder with files to your project, or use Coc
Create a `Cartfile` that lists the framework and run `carthage update`. Follow the [instructions](https://github.com/Carthage/Carthage#if-youre-building-for-ios) to add `$(SRCROOT)/Carthage/Build/iOS/GDPerformanceView.framework` to an iOS project.

```ruby
github "dani-gavrilov/GDPerformanceView-Swift" ~> 1.3.1
github "dani-gavrilov/GDPerformanceView-Swift" ~> 1.3.2
```
Don't forget to import GDPerformanceView by adding:

Expand All @@ -38,7 +38,7 @@ platform :ios, '8.0'
use_frameworks!

target 'project_name' do
pod 'GDPerformanceView-Swift', '~> 1.3.1'
pod 'GDPerformanceView-Swift', '~> 1.3.2'
end
```
Don't forget to import GDPerformanceView by adding:
Expand Down
Binary file modified performance_view_5.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 32eb077

Please sign in to comment.