Comments (2)
やること
- githubで管理する
- DBのschema確認
- mysqlのindexを貼る
- [ ]
from isucon8-qualify.
いろいろ確認する.sh
#!/bin/bash
echo ''
echo 'COMMAND: grep processor /proc/cpuinfo | wc -l'
echo ''
echo "CPU Core: $(grep processor /proc/cpuinfo | wc -l)";
echo ''
echo '=================================================='
echo ''
echo 'COMMAND: free -hm'
echo ''
free -m
echo ''
user=$1
database=$2
password=$3
table_names=$(mysql -u $user $database -s -e 'show tables;');
echo '============================================'
echo '============================================'
echo ' Table Schema'
echo '============================================'
echo '============================================'
echo ''
for table_name in $table_names; do
echo $table_name
mysql -u $user $database -e "desc $table_name";
echo ''
done
echo '============================================'
echo '============================================'
echo ' Sample Data'
echo '============================================'
echo '============================================'
echo ''
for table_name in $table_names; do
echo $table_name
echo "SELECT * FROM $table_name LIMIT 5;"
mysql -u $user $database -e "SELECT * FROM $table_name LIMIT 5";
echo ''
done
- kataribe binary
cd ~
sudo apt-get install unzip
sudo yum install unzip
wget https://github.com/matsuu/kataribe/releases/download/v0.3.0/linux_amd64.zip
unzip linux_amd64.zip
- myprofiler
wget https://github.com/KLab/myprofiler/releases/download/0.1/myprofiler.linux_amd64.tar.gz
tar xf myprofiler.linux_amd64.tar.gz
sudo mv myprofiler /usr/local/bin/
rm myprofiler.linux_amd64.tar.gz
myprofiler -user=root で実行
- rack-lineprof
gem install specific_install
gem specific_install https://github.com/kainosnoema/rack-lineprof.git
touch /var/log/lineprof.log
sudo chmod 666 /var/log/lineprof.log
# app.rb
require 'rack-lineprof'
require 'logger' # このrequire要らないかも
logger = Logger.new('/var/log/lineprof.log')
use Rack::Lineprof, profile: 'app.rb', logger: logger # 基本的にはコメントアウトしておく
timestamp=`date +'%m%d_%T'`; sudo cp /var/log/nginx/access.log "/var/log/nginx/access${timestamp}.log"; sudo cp /dev/null /var/log/nginx/access.log
from isucon8-qualify.
Related Issues (3)
- Redis Cheat Sheet HOT 3
- kataribe
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from isucon8-qualify.