public class Person | |
{ | |
public initonly string Firstname { get; } | |
public initonly string Lastname { get; } | |
}; | |
enum class ByteOrBool { byte Y; bool B;} | |
enum class MixedType | |
{ |
A lot of people land when trying to find out how to calculate CPU usage metric correctly in prometheus, myself included! So I'll post what I eventually ended up using as I think it's still a little difficult trying to tie together all the snippets of info here and elsewhere.
This is specific to k8s and containers that have CPU limits set.
To show CPU usage as a percentage of the limit given to the container, this is the Prometheus query we used to create nice graphs in Grafana:
sum(rate(container_cpu_usage_seconds_total{name!~".*prometheus.*", image!="", container_name!="POD"}[5m])) by (pod_name, container_name) /
Instructions to hack up WSL2 on Windows 10 Build 18917 to run k3s (Kubernetes) and rio
https://docs.microsoft.com/en-us/windows/wsl/wsl2-install
I already had Ubuntu-18.04 installed in wsl 1. So I just did wsl --set-version Ubuntu-18.04 2
Using Ubuntu 18.04 (I'm sure any distro will work), inside WSL2 download https://thirdpartysource.microsoft.com/download/Windows%20Subsystem%20for%20Linux%20v2/May%202019/WSLv2-Linux-Kernel-master.zip and extract to a folder. The latest version of the kernel source is available at (https://github.com/microsoft/WSL2-Linux-Kernel)
let fs = require("fs-jetpack"), | |
path = require("path"), | |
inline = require("inline-css"); | |
// This inlines the css of the HTML coverage output as VSTS | |
// strips all external CSS files | |
const CODE_COVERAGE_DIRECTORY = "./coverage"; | |
const files = fs.find(CODE_COVERAGE_DIRECTORY, { matching: "*.html" }); |