Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Able to Start Multiple Instances of SwiftMetrics Leading to Display Issues #189

Open
jonathan-spruce opened this issue Jun 22, 2018 · 0 comments

Comments

@jonathan-spruce
Copy link
Contributor

As SwiftMetrics is now already included when using kitura init, adding the following code starts a second SwiftMetrics instance leading to the dashboard displaying multiple versions of each metric (e.g. memory, cpu, etc.) and display issues with the tables:

import SwiftMetrics
import SwiftMetricsDash

// Enable SwiftMetrics Monitoring
let sm = try SwiftMetrics()

// Pass SwiftMetrics to the dashboard for visualising
let smd = try SwiftMetricsDash(swiftMetricsInstance : sm)

Screenshot of issue:
screen shot 2018-06-20 at 13 21 38

Environment Details

macOS 10.13.5, Swift 4.2.1, Xcode 9.4.1

Steps to Reproduce

  1. Run kitura init to create a new project
  2. Add the above code to the project
  3. Run the project and access the SwiftMetricsDash from localhost:[port_no]/swiftmetrics-dash
  4. Each metrics graph is duplicated multiple times and incorrectly displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant