二月 23, 2010
» 'hello world' ab tests between pylons 0.9.7 and node.js v0.1.30

A rough play, just for fun.

pylons code:

class HelloController(BaseController):

    def index(self):
        return 'Hello World'


Configuration of prod.ini:

debug = false
...
set debug = false

run with:
paster serve prod.ini

node.js code:

var sys = require('sys'),
   http = require('http');

http.createServer(function (req, res) {
    res.writeHeader(200, {'Content-Type': 'text/plain'});
    res.write('Hello World');
    res.close();
}).listen(8000);

sys.puts('Server running at http://0.0.0.0:8000/');

//(filename: serv.js)

run with:
node serv.js
Result of Pylons:

 % ab -kc 10 -t 10 http://192.168.7.77:8000/

Benchmarking 192.168.7.77 (be patient)
Completed 5000 requests
Finished 6325 requests


Server Software:        PasteWSGIServer/0.5
Server Hostname:        192.168.7.77
Server Port:            8000

Document Path:          /
Document Length:        11 bytes

Concurrency Level:      10
Time taken for tests:   10.094 seconds
Complete requests:      6325
Failed requests:        0
Write errors:           0
Keep-Alive requests:    0
Total transferred:      1341099 bytes
HTML transferred:       69575 bytes
Requests per second:    632.49 [#/sec] (mean)
Time per request:       15.810 [ms] (mean)
Time per request:       1.581 [ms] (mean, across all concurrent requests)
Transfer rate:          130.90 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    2  84.2      0    2997
Processing:     2   12  22.1     10     644
Waiting:        1   10  22.0      8     640
Total:          2   15  90.4     10    3639

Percentage of the requests served within a certain time (ms)
  50%     10
  66%     12
  75%     12
  80%     13
  90%     15
  95%     17
  98%     22
  99%     47
 100%   3639 (longest request)


Resulf of node.js:

% ab -kc 10 -t 10 http://192.168.7.77:8000/

Benchmarking 192.168.7.77 (be patient)
Completed 5000 requests
Completed 10000 requests
Completed 15000 requests
Completed 20000 requests
Completed 25000 requests
Completed 30000 requests
Completed 35000 requests
Completed 40000 requests
Completed 45000 requests
Finished 50000 requests


Server Software:       
Server Hostname:        192.168.7.77
Server Port:            8000

Document Path:          /
Document Length:        11 bytes

Concurrency Level:      10
Time taken for tests:   6.185093 seconds
Complete requests:      50000
Failed requests:        0
Write errors:           0
Keep-Alive requests:    0
Total transferred:      3750000 bytes
HTML transferred:       550000 bytes
Requests per second:    8083.95 [#/sec] (mean)
Time per request:       1.237 [ms] (mean)
Time per request:       0.124 [ms] (mean, across all concurrent requests)
Transfer rate:          592.07 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     0    0   3.5      0      81
Waiting:        0    0   3.5      0      80
Total:          0    0   3.5      0      81

Percentage of the requests served within a certain time (ms)
  50%      0
  66%      1
  75%      1
  80%      1
  90%      1
  95%      1
  98%      1
  99%      2
 100%     81 (longest request)

十二月 15, 2009
» 微軟中國模仿噗浪

關鍵字遊戲:微軟,中國,模仿,噗浪。

"Imitation may be the sincerest form of flattery, but blatant theft of code, design, and UI elements is just not cool, especially when the infringing party is the biggest software company in the world." ~ Microsoft China rips off Plurk@amix.dk

我對這段話的翻譯:

「模仿可能是最真誠的奉承形式,然而明目張膽的瓢竊程式碼、設計及使用者介面元素,這一點也不酷,特別是當侵害的一方是世界上最大的軟體公司。」

不禁想到一句:「勢者,因利而制權也。」真好奇他們伺服器端是不是也要來搞 Python + Tokyo Cabinet

其它參考:

  • 微軟中國推出「山寨版」的Plurk噗浪-MSN聚酷
  • Plurk 聲明的中文版
  • MSN聚酷上的服務使用條款連結
    10. 軟體

    如果您在我們的服務過程中收到軟體,則必須在接受使用權條款下才能使用該軟體。若沒有使用權條款或除非本合約另有說明,則只能在您的服務商品所述的一定數量的電腦所授權使用的服務上,使用該軟體。我們保留軟體的其他所有權利。

    我們可以自動檢查您的軟體版本。我們可以將軟體升級自動下載到您的電腦,執行更新、加強功能及進一步開發服務。

    除非我們另行通知,否則軟體的使用權限會在服務結束日期終止,您必須立即解除安裝軟體。在服務結束日期後,我們會停用軟體。

    您不能對服務所包含的任何軟體反組譯、反編譯或反向工程,除非 (也僅限) 法律明確允許此類活動。

    此軟體受美國輸出法令及法規約制。您必須遵守軟體所適用的所有國內和國際輸出法和法規。這些法律包括目的地、終端用戶和最終使用的限制。若需其他資訊,請參閱 http://www.microsoft.com/exporting (英文網頁)。

    若您使用軟體存取受到 Microsoft 數位版權管理 (DRM) 保護的內容,為了讓您能播放此內容,軟體可能會自動在網際網路上向版權伺服器要求媒體使用權,並下載安裝可用的 DRM 更新。如需相關資訊,請參閱 http://go.microsoft.com/fwlink/?LinkId=123883

  • Evil-smelling 的同義字

A Feedjack powered Planet
A Django site.