This file contains 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
use strict; | |
use feature 'say'; | |
use CGI; | |
main() unless caller(); | |
sub main { | |
local $ENV{REQUEST_METHOD} = "GET"; | |
qstring_is_not_empty(); | |
qstring_is_empty(); |
This file contains 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
following shows that the Go version is MUCH faster parsing the templates, but the VM is slower. | |
see https://github.com/lestrrat/go-xslate/tree/master/bench | |
$ perl driver.pl | |
# p5-xslate (cache DISABLED) | |
iter (10) | |
* Elapsed: 0.05115 seconds | |
* Iter per sec: 195.503421309873 iter/sec | |
iter (100) | |
* Elapsed: 0.188323 seconds |
This file contains 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
# p5-xslate (cache DISABLED) | |
iter (10) | |
* Elapsed: 0.077450 seconds | |
* Secs per iter: 0.007745 secs/iter | |
* Iter per sec: 129.115558 iter/sec | |
iter (100) | |
* Elapsed: 0.175402 seconds | |
* Secs per iter: 0.001754 secs/iter | |
* Iter per sec: 570.118927 iter/sec | |
iter (1000) |
This file contains 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
# p5-xslate (cache DISABLED) | |
iter (10) | |
* Elapsed: 0.058262 seconds | |
* Secs per iter: 0.005826 secs/iter | |
* Iter per sec: 171.638461 iter/sec | |
iter (100) | |
* Elapsed: 0.122816 seconds | |
* Secs per iter: 0.001228 secs/iter | |
* Iter per sec: 814.226159 iter/sec | |
iter (1000) |
This file contains 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
(pprof) top10 | |
Total: 665 samples | |
417 62.7% 62.7% 425 63.9% syscall.Syscall | |
26 3.9% 66.6% 59 8.9% runtime.mallocgc | |
16 2.4% 69.0% 32 4.8% syscall.ByteSliceFromString | |
15 2.3% 71.3% 15 2.3% etext | |
15 2.3% 73.5% 15 2.3% scanblock | |
10 1.5% 75.0% 10 1.5% sweepspan | |
7 1.1% 76.1% 7 1.1% runtime.markallocated | |
6 0.9% 77.0% 110 16.5% github.com/lestrrat/go-xslate/loader.(*CachedByteCodeLoader).Load |
This file contains 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
I disabled stat() on the cache file if the same file has been stat within the last second, and voila, go-xslate is FASTER! | |
# p5-xslate (cache DISABLED) | |
iter (10) | |
* Elapsed: 0.058350 seconds | |
* Secs per iter: 0.005835 secs/iter | |
* Iter per sec: 171.379606 iter/sec | |
iter (100) | |
* Elapsed: 0.132784 seconds | |
* Secs per iter: 0.001328 secs/iter |
This file contains 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
# DockerでCPANインストール祭りを繰り返してたらいい加減cpanmとかに並列処理が欲しくなってきた。 | |
# で、とりあえずgoでラッパーを作って、 | |
# 1) 先にMETA.yamlを読み込み、依存関係を解析 | |
# 2) キューに突っ込んで goroutineでそれぞれcpanmを起動してインストール | |
# という簡単な処理をしてみてどういう差が出るかやってみた | |
# | |
# 試すには go install github.com/lestrrat/go-cpan-maybe-faster/cli/go-cpan | |
# https://github.com/lestrrat/go-cpan-maybe-faster | |
$ time go-cpan --notest --local-lib-contained=local Moose |
This file contains 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
struct passwd { | |
char *pw_name; /* user name */ | |
char *pw_passwd; /* encrypted password */ | |
uid_t pw_uid; /* user uid */ | |
gid_t pw_gid; /* user gid */ | |
__darwin_time_t pw_change; /* password change time */ | |
char *pw_class; /* user access class */ | |
char *pw_gecos; /* Honeywell login info */ | |
char *pw_dir; /* home directory */ | |
char *pw_shell; /* default shell */ |
This file contains 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
shoebill% go test -v . | |
=== RUN Test_appliance | |
--- PASS: Test_appliance (0.00 seconds) | |
=== RUN Test_blank | |
--- PASS: Test_blank (0.00 seconds) | |
=== RUN Test_crawler_google | |
--- PASS: Test_crawler_google (0.00 seconds) | |
=== RUN Test_crawler_nonmajor | |
--- PASS: Test_crawler_nonmajor (0.00 seconds) | |
=== RUN Test_crawler |
This file contains 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
140725 09:41:39 ha_queue: /usr/local/src/mysql-5.6.19/storage/q4m/src/ha_queue.cc:2008: starting table compaction: ./XXXXXXX/queue_XXXXXXXX (begin: 491349793, end: 491349793, rows: 18446744073709551613) | |
140725 09:41:40 ha_queue: /usr/local/src/mysql-5.6.19/storage/q4m/src/ha_queue.cc:2134: finished table compaction: ./XXXXXXX/queue_XXXXXXXX (begin: 4096, end: 4096, rows: 0) | |
mysqld: /usr/local/src/mysql-5.6.19/storage/q4m/src/dllist.h:38: T* dllist<T, Cnt>::detach(T*&, size_t) [with T = queue_connection_t, long unsigned int Cnt = 1ul]: Assertion `_prev[idx] != __null' failed. | |
2014-07-25 09:41:40 4645 [ERROR] Got error 145 when reading table './XXXXXXX/queue_XXXXXXXX' | |
00:41:40 UTC - mysqld got signal 6 ; | |
This could be because you hit a bug. It is also possible that this binary | |
or one of the libraries it was linked against is corrupt, improperly built, | |
or misconfigured. This error can also be caused by malfunctioning hardware. | |
We will try our best to scrape up some info that will hopefully help | |
diagnose the prob |
OlderNewer