Skip to content

Instantly share code, notes, and snippets.

View fritshoogland-yugabyte's full-sized avatar

Frits Hoogland fritshoogland-yugabyte

View GitHub Profile
// Sample java class to measure prepared statement latencies.
// I am not a java programmer, nor play one on TV. Use at your own risk.
// Frits Hoogland, Yugabyte.
// remarks:
// create table statement: create table t (i int primary key);
// JDBC is a dependency for this class. I used postgresql-jdbc from the postgres pgdg-common repository.
//
// compile and run:
// javac -classpath /usr/share/java/postgresql-jdbc3.jar:. JdbcMiniBenchmark.java
// java -classpath /usr/share/java/postgresql-jdbc3.jar:. JdbcMiniBenchmark
#!/usr/bin/awk -f
BEGIN {
while ( getline < "/proc/meminfo" > 0 )
all_memory[$1]=$2
for ( type in all_memory ) {
if ( type == "MemFree:" ||
type == "Buffers:" ||
type == "Dirty:" ||
type == "SwapCached:" ||
type == "Writeback:" ||
#!/usr/bin/env python
import urllib.request as request
import json, time, sys, os, re
from timeit import default_timer as timer
url_to_read = [ { 'url': "http://localhost:13000/rpcz" } ]
os.system('clear')
while True:
#!/usr/bin/env python
import urllib.request as request
import json, time, sys, os, re
from timeit import default_timer as timer
url_to_read = [ { 'url': "http://localhost:13000/statements" } ]
current_statements_calls={}
current_statements_total_time={}
current_statements_min_time={}
#!/usr/bin/env python
#
# sudo pip3 install requests
#
import requests
import datetime
import re
import sys
import getopt
import time
#!/usr/bin/env python
#
# this requires some python libraries to be installed:
# BeautifulSoup: sudo pip3 install BeautifulSoup4
# lxml : sudo pip3 install lxml
# humanfriendly: sudo pip3 install humanfriendly
#
from bs4 import BeautifulSoup
import urllib.request as request
import humanfriendly
@fritshoogland-yugabyte
fritshoogland-yugabyte / yb-server-metric-diff.py
Last active April 13, 2021 13:25
Yugabyte server metrics diff
#!/usr/bin/env python
from timeit import default_timer as timer
import urllib.request as request
import json, time, sys, os, re
time_between_updates = 5
skip_tablets = False
group_tablet_stats = False
current_statistics_values = {}

Keybase proof

I hereby claim:

  • I am fritshoogland-yugabyte on github.
  • I am fritshoogland (https://keybase.io/fritshoogland) on keybase.
  • I have a public key ASC2Ei641eg15khFZNwLt-k8BCfZ76rkYGJS1oOUciCsowo

To claim this, I am signing this object: