Skip to content

Crousem/performanceMonitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Netskope Performance Monitor

A local macOS app to measure how the Netskope security client affects your laptop. You record labeled Netskope ON and Netskope OFF sessions while doing comparable work, then compare CPU, memory, battery, network latency, and real per-request HTTP timing from Cursor, Chrome, and Claude side-by-side.

It does not prove causation on its own. It gives repeatable A/B evidence when you run similar workloads in ON vs OFF sessions.

How it works

Launch apps with CDP debug ports
        |
Toggle Netskope ON/OFF in the menu bar
        |
Start a labeled recording session  ->  background sampler + CDP listeners + probes
        |
Watch the Live Dashboard (elapsed-time charts)
        |
Stop, then Compare ON vs OFF sessions
  • System metrics via psutil: CPU, memory, battery, plus per-process cost for Netskope, Cursor, and Chrome.
  • Per-app HTTP timing via the Chrome DevTools Protocol (CDP): Cursor, Chrome, and Claude Desktop are Electron/Chromium apps that expose a remote debugging port. The monitor connects as a background client and records every completed request's timing breakdown.
  • Synthetic probes (curl/ping) run as a secondary network baseline.

Requirements

  • macOS
  • Python 3.11+ (3.13 recommended)
  • Docker Desktop (optional — enables container monitoring)

Quick start

git clone https://github.com/Crousem/performanceMonitor.git
cd performanceMonitor
./install.sh

install.sh does everything in one step:

  1. Verifies Python 3.11+
  2. Creates .venv and installs all dependencies from requirements.txt
  3. Initialises the SQLite database schema
  4. Makes all scripts in scripts/ executable

Then start the app:

./scripts/run.sh

This starts the Streamlit app at http://localhost:8501.

Manual setup (if you prefer step-by-step):

python3.13 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
./scripts/run.sh

CDP setup (for per-app HTTP timing)

Each app must be launched with a remote debugging port. Quit the app fully first (Cmd+Q, not just closing the window). Helper scripts are provided:

./scripts/launch-cursor-debug.sh   # port 9222
./scripts/launch-chrome-debug.sh   # port 9223 (dedicated debug profile)
./scripts/launch-claude-debug.sh   # port 9224

Verify a port is live:

curl http://localhost:9223/json

The Setup page in the app shows green/red status for each port.

Notes and caveats:

  • Each app needs its own port if running simultaneously.
  • Chrome uses a dedicated profile under ~/.perf-monitor/chrome-profile so your daily profile is untouched. Do your browsing test in that debug Chrome window.
  • Keep apps foregrounded during timed tests; macOS throttles background Electron windows.
  • Debug ports are localhost-accessible. Enable only during testing.
  • Some native (non-Chromium) traffic, e.g. certain Cursor background services, will not appear in CDP.

Recommended test protocol

For meaningful A/B results:

  1. Launch the apps with CDP via the helper scripts.
  2. Baseline OFF session (5-15 min): label OFF, run a fixed workload.
  3. Enable Netskope from the menu bar, wait 1-2 minutes for it to stabilize.
  4. ON session: same duration, same workload (reload the same Chrome tabs, repeat the same Cursor/Claude prompt).
  5. Repeat 2-3 times to reduce noise.

Suggested workloads (pick one per ON/OFF pair):

  • Browsing: reload the same 5 tabs in the debug Chrome on a timer.
  • Cursor: agent chat or an index-heavy repo operation.
  • Claude: send the same prompt in Claude Desktop.
  • Mixed: your real work pattern across all three apps.

Keep Wi-Fi vs wired, battery vs plugged-in, and other VPNs constant between the ON and OFF runs of a pair.

Toggling Netskope

On modern macOS the Netskope network extension cannot be stopped via launchctl. Disable it from the menu bar (or System Settings). This app does not automate the toggle; it relies on you labeling each session ON or OFF and shows an advisory warning if the detected process state does not match.

Project layout

performanceMonitor/
├── app/
│   ├── streamlit_app.py        # entry point + shared state
│   └── pages/                  # Setup, Record, Live Dashboard, Compare, Export
├── monitor/                    # metric collectors + orchestration
├── storage/                    # SQLite schema + access layer
├── scripts/                    # run + CDP launch helpers
├── config/default.yaml         # process patterns, probe URLs, CDP ports/filters
└── data/                       # SQLite DB (gitignored)

Data and export

All data is stored locally in data/perfmon.db (SQLite). The Export page lets you download per-session CSVs or a full database backup to share with IT or Netskope support. Netskope also ships a diagnostic tool at /Library/Application Support/Netskope/STAgent/nsdiag.

About

macOS app to measure the performance impact of Netskope: CPU, memory, battery, HTTP latency (CDP), network probes, and Docker container stats

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors