←back to thread

176 points zorlack | 8 comments | | HN request time: 0.829s | source | bottom

I've frequently found myself using [nvitop](https://github.com/XuehaiPan/nvitop) to diagnose GPU/CPU contention issues.

The two best things about it are:

- It's easy to install if I can access pip in the container

- It makes a compelling screenshot (which helps me communicate with coworkers.)

With those two lessons in mind: Here is Sping!

Purpose: Help observe and diagnose latency issues at layer 4+ (TCP/HTTP/HTTPS)

Two good things about it:

- It's easy to install if you have pip. (Available at [service-ping-sping](https://pypi.org/project/service-ping-sping/) on PyPi)

- It makes a compelling screenshot.

Not sure if this is the kind of thing that anyone else would be interested in. But I've enjoyed making it and intend to keep using it.

1. guessmyname ◴[] No.45011531[source]
> It's easy to install if you have pip. (Available at service-ping-sping on PyPi)

Consider rewriting the program in Go, then you’ll have a statically linked binary that’s much easier to install (less dependencies) and will be much faster too.

replies(4): >>45011583 #>>45012689 #>>45012814 #>>45012827 #
2. Cthulhu_ ◴[] No.45011583[source]
If that is the objective, there's a few options available; a more pragmatic one is to use a tool that bundles a Python runtime and the application into a single executable, there's a few options there. Rewriting in a different language should always be a last resort given the time investment required.
replies(2): >>45011831 #>>45011843 #
3. guessmyname ◴[] No.45011831[source]
> Rewriting in a different language should always be a last resort given the time investment required.

Makes no sense. This is a relatively small program that can easily be rewritten by a large large model like ChatGPT, Claude, Gemini, etc. in a day session.

4. kunley ◴[] No.45011843[source]
> Rewriting in a different language should always be a last resort given the time investment required.

..or, a refreshing and exciting experience.

5. akx ◴[] No.45012689[source]
These days, once you have https://docs.astral.sh/uv/ installed, `uvx --from service-ping-sping sping` is pretty much zero effort to run this software.
replies(1): >>45018488 #
6. zorlack ◴[] No.45012814[source]
You're certainly right that statically linked binary is the most optimal expression of this goal. Especially for use in a secure environment.

Alas, this is just a python tool :)

7. import ◴[] No.45012827[source]
Not here to advise rewriting from scratch but I found myself considering using go/rust/c stuff instead of Python in the last few years. Less headache and more predictable
8. 1718627440 ◴[] No.45018488[source]
Except if you don't like pulling random programs from the internet.