Today I just wanted to know which of these options is faster:
- Go HTTP standalone
- Nginx proxy to Go HTTP
- Nginx fastcgi to Go TCP FastCGI
- Nginx fastcgi to Go Unix Socket FastCGI
#/usr/bin/env python | |
diff=""" | |
- | |
- | |
- | |
- |
# Runs a specified shell command in a separate thread. | |
# If it exceeds the given timeout in seconds, kills it. | |
# Returns any output produced by the command (stdout or stderr) as a String. | |
# Uses Kernel.select to wait up to the tick length (in seconds) between | |
# checks on the command's status | |
# | |
# If you've got a cleaner way of doing this, I'd be interested to see it. | |
# If you think you can do it with Ruby's Timeout module, think again. | |
def run_with_timeout(command, timeout, tick) | |
output = '' |
import json,sys,os | |
import urllib2 | |
url = 'http://x.x.x.x/job/x.x.x.x/lastBuild/api/json' | |
try: | |
u = urllib2.urlopen(url).read() | |
except: | |
exit(100) | |
baseim = json.loads(u) | |
baseim_revision = baseim["changeSet"]['revisions'][0]['revision'] |
import json,sys,os | |
import urllib2 | |
url = 'http://10.6.198.114/job/BaseIM_basicim4ml/lastBuild/api/json' | |
try: | |
u = urllib2.urlopen(url).read() | |
except: | |
exit(0) | |
try: | |
baseim = json.loads(u) |
rem see http://commons.apache.org/daemon/procrun.html | |
set SERVICE_HOME=c:\hoge | |
%SERVICE_HOME%\service.exe //IS//Jenkins --DisplayName=Jenkins --StartPath=%SERVICE_HOME% --LogPath=%SERVICE_HOME%\logs --LogLevel=Debug --StdOutput=auto --StdError=auto --StartMode=Java --StopMode=Java --Jvm=auto ++JvmOptions=-jar ++JvmOptions=start.jar |
#!/sbin/runscript | |
# GitLab init script for Gentoo Linux | |
# see https://github.com/gitlabhq/gitlabhq/blob/master/doc/installation.md | |
GITLAB_BASE=/home/gitlab/gitlab | |
GITLAB_USER=gitlab | |
depend() { | |
need net mysql redis | |
} |
#!/bin/bash -l | |
export LANG=zh_CN.UTF-8 | |
export com.apple.java.jvmTask=WebStart | |
javaws -verbose -wait http://10.10.86.44:1025/computer/QQCISERVER01/slave-agent.jnlp |
# Two ENV variables control the 'gem' command: | |
# | |
# GEM_HOME: the single path to a gem dir where gems are installed | |
# GEM_PATH: a standard PATH to gem dirs where gems are found | |
# | |
# A gem directory is a directory that holds gems. The 'gem' command will lay | |
# out and utilize the following structure: | |
# | |
# bin # installed bin scripts | |
# cache # .gem files ex: cache/gem_name.gem |
RECEIPT_FILE=/var/db/receipts/com.apple.pkg.DeveloperToolsCLI.bom | |
RECEIPT_PLIST=/var/db/receipts/com.apple.pkg.DeveloperToolsCLI.plist | |
if [ ! -f "$RECEIPT_FILE" ] | |
then | |
echo "Command Line Tools not installed." | |
exit 1 | |
fi | |
echo "Command Line Tools installed, removing ..." |