Skip to content

Instantly share code, notes, and snippets.

View mmarchini's full-sized avatar
🛑
taking a break

mary marchini mmarchini

🛑
taking a break
View GitHub Profile
@mmarchini
mmarchini / README.md
Last active January 22, 2018 19:41
Node v6.x runtime --perf-basic-prof toggling

Node v6.x runtime --perf-basic-prof toggling

Builds

Linux x86: node-v6.12.3

Linux x64: node-v6.12.3

Docker apline image: docker pull sthima/node-custom-build:toggle-perf-basic-prof (Dockerfile)

@mmarchini
mmarchini / chrome-devtools-heapsnapshot-Loading-benchmark.md
Last active January 4, 2018 19:11
Chrome DevTools Heap Snapshot Loading Benchmark

Chrome DevTools Heap Snapshot Loading Benchmark

Benchmark of the Chrome DevTools to determine if it can load large Heap Snapshots. Specs of the environment used are available at Environment Specs.

Results

Time to Load is an approximate value, as there's no way (that I'm aware of) to measure the loading time of a heap snapshot in Chrome DevTools.

@mmarchini
mmarchini / v8-heap-snapshot-schema.md
Last active March 10, 2020 14:12
V8 Heap Snapshot Schema

V8 Heap Snapshot Schema

Key Description
snapshot Metadata from the snapshot. See snapshot
nodes List of heap nodes. See nodes
edges List of heap edges between nodes. See edges
trace_function_infos ???
trace_tree ???
@mmarchini
mmarchini / node_debug_support.cc
Created December 13, 2017 12:44
Node Debug Support
//
// This file is generated by ./tools/gen-postmortem-metadata.py. Do not edit directly.
//
// Need to import standard headers before redefining private, otherwise it
// won't compile
#include <algorithm>
#include <array>
#include <atomic>
@mmarchini
mmarchini / demo.py
Last active October 23, 2017 16:53
Python StapSDT example
from time import sleep
import stapsdt
# Create a Provider, which we'll use to register probes
provider = stapsdt.Provider("pythonapp")
# Register your first probe with two arguments by passing its types
probe = provider.add_probe(
"firstProbe", stapsdt.ArgTypes.uint64, stapsdt.ArgTypes.int32)
@mmarchini
mmarchini / index.js
Last active October 24, 2017 15:09
Node USDT example
// Import usdt module
const USDT = require("usdt");
// Create a Provider, which we'll use to register probes
const provider = new USDT.USDTProvider("nodeProvider");
// Register your first probe with two arguments by passing its types
const probe1 = provider.addProbe("firstProbe", "int", "char *");
// Enable provider (needed to fire probes later)
@mmarchini
mmarchini / Makefile
Last active September 25, 2017 20:34
Minimal ELF Shared Library for Linux x64_64, written entirely in assembly
all:
nasm -f bin -o small-raw.so small-raw.asm
chmod +x small-raw.so
@mmarchini
mmarchini / docker-env
Created June 5, 2017 15:49
Docker Env converter from Windows to WSL
#!/usr/bin/env python3
from subprocess import run, PIPE
completed_process = run(["docker-machine.exe", "env", "--shell", "bash"], stdout=PIPE)
docker_env = completed_process.stdout.decode("ascii")
for line in docker_env.split("\n"):
if "DOCKER_CERT_PATH" in line:
@mmarchini
mmarchini / debug.log
Created May 23, 2017 00:58
Vagrantfile error problem on WSL
INFO global: Vagrant version: 1.9.5
INFO global: Ruby version: 2.2.5
INFO global: RubyGems version: 2.4.5.1
INFO global: VAGRANT_WSL_ENABLE_WINDOWS_ACCESS="1"
INFO global: VAGRANT_OLD_ENV_PWD="/home/matheus/workspace/sthima/netell"
INFO global: VAGRANT_OLD_ENV_LESSOPEN="| /usr/bin/lesspipe %s"
INFO global: VAGRANT_OLD_ENV_VAGRANT_WSL_ENABLE_WINDOWS_ACCESS="1"
INFO global: VAGRANT_OLD_ENV_LANG="en_US.UTF8"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/embedded"
INFO global: VAGRANT_OLD_ENV_SSH_AUTH_SOCK="/tmp/ssh-wlHqbEDYEREC/agent.756"
@mmarchini
mmarchini / debug.log
Created May 23, 2017 00:52
Vagrant up WSL Problem debug log
INFO global: Vagrant version: 1.9.5
INFO global: Ruby version: 2.2.5
INFO global: RubyGems version: 2.4.5.1
INFO global: VAGRANT_WSL_ENABLE_WINDOWS_ACCESS="1"
INFO global: VAGRANT_OLD_ENV_PWD="/home/matheus/workspace/sthima/netell"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_OLD_ENV_TERM="xterm-256color"
INFO global: VAGRANT_OLD_ENV_NAME="DESKTOP-SR404CD"
INFO global: VAGRANT_OLD_ENV_LESSOPEN="| /usr/bin/lesspipe %s"
INFO global: VAGRANT_INSTALLER_ENV="1"