# test-yaml.rb
require 'yaml'
# Psych is complaining about aliases
# YAML.load is safe_load now
# Psych.safe_load yaml, aliases: true
#
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=begin | |
This script attempts to reproduce poor glibc allocator behavior within Ruby, leading | |
to extreme memory fragmentation and process RSS bloat. | |
glibc allocates memory using per-thread "arenas". These blocks can easily fragment when | |
some objects are free'd and others are long-lived. | |
Our script runs multiple threads, all allocating randomly sized "large" Strings between 4,000 | |
and 40,000 bytes in size. This simulates Rails views with ERB creating large chunks of HTML | |
to output to the browser. Some of these strings are kept around and some are discarded. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# vi: ft=sh | |
# | |
# © 2019 Konstantin Gredeskoul, Inc., All rights reserved. | |
# MIT LICENSE | |
# | |
# ———————————————————————————————————————————————————————————————— | |
# This script verifies that the current ruby (in PATH) is linked | |
# with libjemalloc library for efficient memory utilization. | |
# It works identically on Linux and Mac OSX. |
brew install mutagen-io/mutagen/mutagen mutagen-io/mutagen/mutagen-compose
docker-compose.yml
# Define synchronization and forwarding sessions
x-mutagen:
sync:
defaults:
bundle exec rake zeitwerk:check
load_defaults "6.0 # use zeitwerk
config.autoloader = :classic # not use zeitwerk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ | |
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list && \ | |
apt-get -yq update && apt-get -yq install google-chrome-stable | |
CHROMEDRIVER_VERSION=$(curl -s http://chromedriver.storage.googleapis.com/LATEST_RELEASE) && \ | |
cd /tmp/ && curl -L -O "http://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip" && \ | |
unzip chromedriver_linux64.zip && chmod +x chromedriver && mv chromedriver /usr/bin |