Sean's Blog

心之所向,身之所往。

[Prometheus] What is the difference between rate and irate

Here are the definitions from the official document for rate() and irate(). But if you still don’t quite understand, check the examples below. In this example, I select all the values I have recorded within the last 1 minute for all time series that have the metric name prometheus_http_requests_total and a handler label set to /metrics: prometheus_http_requests_total{handler=”/metrics”}[1m] Output from the Prometheus UI: # Element prometheus_http_requests_total{code="200",handler="/metrics",instance="localhost:9090",job="prometheus"} # ValueHere are the definitions from the official document for rate() and irate().

Useful commands for zsh

Moving the cursor Ctrl+A: To move to the beginning of the current line. Ctrl+E: To move to the end of the current line. Manipulating your typing Ctrl+W: To delete the word in front of the cursor. Ctrl+U: To clear the entire line. Ctrl+K: To clear the characters on the line after the current cursor position.

How to cherry-pick a commit from another git repository?

# Adding (as "other") the repo from we want to cherry-pick $ git remote add other git://github.com/username/repo.git # Fetch the "other" branch $ git fetch other # Cherry-pick the commit we need $ git cherry-pick 0549522