Skip to content

Instantly share code, notes, and snippets.

@thoward
thoward / neo4j-metrics-example-output.txt
Created April 22, 2022 01:27
Example output from Neo4j metrics endpoint.
# HELP neo4j_system_cypher_replan_events_total Generated from Dropwizard metric import (metric=neo4j.system.cypher.replan_events, type=com.neo4j.metrics.metric.MetricsCounter)
# TYPE neo4j_system_cypher_replan_events_total counter
neo4j_system_cypher_replan_events_total 0.0
# HELP neo4j_system_db_query_execution_failure_total Generated from Dropwizard metric import (metric=neo4j.system.db.query.execution.failure, type=com.codahale.metrics.Meter)
# TYPE neo4j_system_db_query_execution_failure_total counter
neo4j_system_db_query_execution_failure_total 0.0
# HELP neo4j_system_transaction_active_write Generated from Dropwizard metric import (metric=neo4j.system.transaction.active_write, type=com.neo4j.metrics.source.db.TransactionMetrics$$Lambda$1093/0x0000000800982840)
# TYPE neo4j_system_transaction_active_write gauge
neo4j_system_transaction_active_write 0.0
# HELP neo4j_vm_pause_time Generated from Dropwizard metric import (metric=neo4j.vm.pause_time, type=com.neo4j.metrics.source.jvm.PauseMetrics$$Lambda$14
@thoward
thoward / envoy-metrics-example-output.txt
Last active April 21, 2022 23:49
Example output from Envoy metrics endpoint.
# TYPE envoy_cluster_assignment_stale counter
envoy_cluster_assignment_stale{envoy_cluster_name="service_envoyproxy_io"} 0
# TYPE envoy_cluster_assignment_timeout_received counter
envoy_cluster_assignment_timeout_received{envoy_cluster_name="service_envoyproxy_io"} 0
# TYPE envoy_cluster_bind_errors counter
envoy_cluster_bind_errors{envoy_cluster_name="service_envoyproxy_io"} 0
# TYPE envoy_cluster_client_ssl_socket_factory_downstream_context_secrets_not_ready counter
@thoward
thoward / cockroachdb-metrics-example-output.txt
Created April 21, 2022 22:38
Example output from CockroachDB metrics endpoint.
# HELP sql_txn_begin_count_internal Number of SQL transaction BEGIN statements successfully executed (internal queries)
# TYPE sql_txn_begin_count_internal counter
sql_txn_begin_count_internal 0
# HELP queue_replicate_transferlease Number of range lease transfers attempted by the replicate queue
# TYPE queue_replicate_transferlease counter
queue_replicate_transferlease{store="1"} 0
# HELP gossip_connections_refused Number of refused incoming gossip connections
# TYPE gossip_connections_refused counter
gossip_connections_refused 0
# HELP sqlliveness_is_alive_cache_hits Number of calls to IsAlive that return from the cache
@thoward
thoward / caddy-metrics-example-output.txt
Created April 21, 2022 22:02
Example output from Caddy Webserver metrics endpoint
# HELP caddy_admin_http_requests_total Counter of requests made to the Admin API's HTTP endpoints.
# TYPE caddy_admin_http_requests_total counter
caddy_admin_http_requests_total{code="200",handler="metrics",method="GET",path="/metrics"} 3
# HELP caddy_http_request_duration_seconds Histogram of round-trip request durations.
# TYPE caddy_http_request_duration_seconds histogram
caddy_http_request_duration_seconds_bucket{code="200",handler="encode",method="GET",server="srv0",le="0.005"} 1
caddy_http_request_duration_seconds_bucket{code="200",handler="encode",method="GET",server="srv0",le="0.01"} 1
caddy_http_request_duration_seconds_bucket{code="200",handler="encode",method="GET",server="srv0",le="0.025"} 1
caddy_http_request_duration_seconds_bucket{code="200",handler="encode",method="GET",server="srv0",le="0.05"} 1
caddy_http_request_duration_seconds_bucket{code="200",handler="encode",method="GET",server="srv0",le="0.1"} 1
@thoward
thoward / docker-metrics-example-output.txt
Created April 21, 2022 21:01
Example of Docker metrics output
# HELP builder_builds_failed_total Number of failed image builds
# TYPE builder_builds_failed_total counter
builder_builds_failed_total{reason="build_canceled"} 0
builder_builds_failed_total{reason="build_target_not_reachable_error"} 0
builder_builds_failed_total{reason="command_not_supported_error"} 0
builder_builds_failed_total{reason="dockerfile_empty_error"} 0
builder_builds_failed_total{reason="dockerfile_syntax_error"} 0
builder_builds_failed_total{reason="error_processing_commands_error"} 0
builder_builds_failed_total{reason="missing_onbuild_arguments_error"} 0
builder_builds_failed_total{reason="unknown_instruction_error"} 0
@thoward
thoward / nested-lists.css
Created June 14, 2017 02:44
Nested Lists CSS: Correct behavior for nested lists at all levels, up to 6 deep. ULs alternate from disc/square. OLs: decimal, upper-alpha, lower-roman, lower-alpha, upper-roman
/* 1st level */
ul li {
list-style-type: disc;
}
ol li {
list-style-type: decimal;
}
/* 2nd level */
ul li ul li {
@thoward
thoward / cli.sh
Created February 11, 2017 00:43
Basic implementation of CLI subcommands/options parsing in Bash
#!/bin/bash
# Private implementation of bar subcommand
_bar() {
echo "foo_value is $foo_value"
echo "flag_value is $flag_value"
echo "1: $1"
echo "2: $2"
echo "3: $3"
}
@thoward
thoward / profiling.py
Created January 29, 2017 20:42
Some snippets for profiling in Python
# paste these in
import contextlib
@contextlib.contextmanager
def profile(result_file_name=None):
import cProfile
import pstats
import sys
pr = cProfile.Profile()
@thoward
thoward / designer.html
Last active August 29, 2015 14:16
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-input/core-input.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@thoward
thoward / designer.html
Created February 24, 2015 22:27
designer
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;