Skip to content

Instantly share code, notes, and snippets.

jmap -histo:live 24339 | more
num #instances #bytes class name (module)
-------------------------------------------------------
1: 227198660 12385906488 [B (java.base@11.0.13)
2: 142153505 4548912160 java.lang.String (java.base@11.0.13)
3: 14945809 4065260048 org.apache.hadoop.hdfs.protocol.DatanodeInfo
WithStorage
4: 44837434 1434797888 io.trino.hadoop.$internal.com.google.protobu
f.LiteralByteString
5: 3910752 1063724544 org.apache.hadoop.hdfs.protocol.DatanodeInfo
object_name | time.count | hits | time.avg | time.min | time.p50 | time.p99 | time.max |
@lawulu
lawulu / cli.md
Last active November 5, 2018 07:41 — forked from phrawzty/2serv.py
simple http server to dump request headers

Python3 version & added respone

$ curl -s -H "X-Something: yeah" localhost:8000 > /dev/null
$ python serv.py
ERROR:root:User-Agent: curl/7.37.1
Host: localhost:8000
Accept: */*
@lawulu
lawulu / wechat_bot_api.py
Created October 22, 2018 02:55
wechat bot Api
from flask import Flask, request
from flask_restful import Resource, Api, abort
from flask_pymongo import PyMongo
import itchat
import logging
from logging.handlers import RotatingFileHandler
EMPTY="_EMPTY_"
from flask import Flask, request
from flask_restful import Resource, Api, abort
from flask_pymongo import PyMongo
import itchat
import logging
from logging.handlers import RotatingFileHandler
EMPTY="_EMPTY_"
@lawulu
lawulu / consumer.sh
Last active February 13, 2019 04:24 — forked from dongjinleekr/consumer.sh
Kafka benchmark commands
## Consumer Throughput: Single consumer thread, no compression
## Consumer Throughput: 3 consumer thread, no compression
bin/kafka-consumer-perf-test.sh --topic benchmark-3-3-none \
--zookeeper prod-us-kafka1:2181,prod-us-kafka2:2181,prod-us-kafka3:2181 \
--messages 15000000 \
--threads 1
#!/usr/bin/python
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select