Skip to content

UI component representing a set of metrics for analyzing the performance of your application.

Notifications You must be signed in to change notification settings

uxn0w/MetricsView

Repository files navigation

MetricsView version

UI component representing a set of metrics for analyzing the performance of your application.

preview

Getting Started

Requirements

  • Platform: iOS 13 or later
  • Swift version: Swift 5.x or later

Installation

Swift Package Manager

To include MetricsView into a Swift Package Manager package, add it to the dependencies attribute defined in your Package.swift file. You can select the version using the majorVersion and minor parameters. For example:

dependencies: [
  .Package(url: "https://github.com/uxn0w/MetricsView.git", majorVersion: <majorVersion>, minor: <minor>)
    ]

Usage

With MetricsWindow

When configure this way, the metric view will always be on top of the other views.

  1. Go to SceneDelegate/scene(_ scene:, willConnectTo session:, options connectionOptions:)
  2. Create MetricsWindow
let metricsWindow = MetricsWindow(windowScene: windowScene)
  1. Set metrics
metricsWindow.metrics = [.cpu, .fps, .hitches, .memory]
  1. Set window

With MetricsView

  1. Create MetricsView
let metricsView = MetricsView()
  1. Set metrics
metricsView.metrics = [.cpu, .fps, .hitches, .memory]
  1. Add metrics view to your subview

About

UI component representing a set of metrics for analyzing the performance of your application.

Resources

Stars

Watchers

Forks

Languages