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
    
  
  
    
  | # encoding:utf-8 | |
| from sqlalchemy import create_engine, Column, Integer, String, DateTime, Text, ForeignKey | |
| from sqlalchemy.orm import scoped_session, sessionmaker, relationship, backref | |
| from sqlalchemy.ext.declarative import declarative_base | |
| from config import DSN | |
| # setup sqlalchemy | |
| engine = create_engine(DSN, encoding='utf-8') | |
| db_session = scoped_session(sessionmaker(autocommit=False, | 
  
    
      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
    
  
  
    
  | use strict; | |
| use warnings; | |
| use Data::Dumper; | |
| use JSON::XS; | |
| use Data::MessagePack; | |
| $| = 1; | |
| my $mp = Data::MessagePack->new(); | |
| while ( my $json = <STDIN> ) { | 
  
    
      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
    
  
  
    
  | use strict; | |
| use Web::Scraper; | |
| use URI; | |
| use LWP::UserAgent; | |
| use YAML::Tiny; | |
| use Data::Dumper; | |
| use Getopt::Long; | |
| my @graph_list; | 
  
    
      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 perl | |
| use strict; | |
| use warnings; | |
| use Data::Dumper; | |
| use Time::Piece; | |
| my $file = shift; | |
| my $ftime = shift; | |
| my $ttime = shift; | 
  
    
      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
    
  
  
    
  | use strict; | |
| use warnings; | |
| use Data::Dumper; | |
| use Parallel::Benchmark; | |
| use RedisDB; | |
| my $bm = Parallel::Benchmark->new( | |
| setup => sub { | |
| my $self = shift; | |
| $self->stash->{redis} = RedisDB->new(host => 'localhost', port => 6379); | 
  
    
      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
    
  
  
    
  | # appendonly yes | |
| $ ./redis-load clients 100 requests 10000000 datasize 32 keyspace 10000000 set 100 | |
| PRNG seed is: 2542776283 - use the 'seed' option to reproduce the same sequence | |
| ====== Report ====== | |
| 10000000 requests in 274.428 seconds | |
| 36439.43 requests per second | |
| 100 parallel clients | |
| payload: 32..32 bytes | |
| keep alive: 1 | 
  
    
      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
    
  
  
    
  | /** | |
| * Module dependencies. | |
| */ | |
| var express = require('express') | |
| , routes = require('./routes'); | |
| var redis = require('redis'); | |
| var app = module.exports = express.createServer(); | 
  
    
      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
    
  
  
    
  | # http://d.hatena.ne.jp/toritori0318/20120723/1343059303 | |
| <source> | |
| type tail | |
| format /^(?<date>[^\t]+)\t(?<cpu-usr>[^\t]+)\t(?<cpu-sys>[^\t]+)\t(?<cpu-idl>[^\t]+)\t(?<cpu-wai>[^\t]+)\t(?<cpu-hiq>[^\t]+)\t(?<cpu-siq>[^\t]+)\t(?<la-1m>[^\t]+)\t(?<la-5m>[^\t]+)\t(?<la-15m>[^\t]+)\t(?<mem-used>[^\t]+)\t(?<mem-buff>[^\t]+)\t(?<mem-cach>[^\t]+)\t(?<mem-free>[^\t]+)\t(?<dsk-read>[^\t]+)\t(?<dsk-writ>[^\t]+)\t(?<io-read>[^\t]+)\t(?<io-writ>[^\t]+)\t(?<net-recv>[^\t]+)\t(?<net-send>[^\t]+)/ | |
| path /tmp/dstat.log | |
| tag dstat.Tclmdrn | |
| </source> | |
| <match dstat.Tclmdrn> | 
  
    
      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
    
  
  
    
  | package Amon2::Config::Simple::Ex; | |
| use strict; | |
| use warnings; | |
| use File::Spec; | |
| use Carp (); | |
| sub load { | |
| my ($class, $c) = (shift, shift); | |
| my %conf = @_ == 1 ? %{$_[0]} : @_; | 
  
    
      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
    
  
  
    
  | --- | |
| host: localhost:5125 | |
| # 指定するとフィルタがかかる | |
| #service_name: hogehoge | |
| #section_name: fugafuga | |
| # グラフデータのデフォルト値 | |
| #graph_data: | |
| # sumup: 1 # 合計値を表示するかどうか? |