Class: NetSystem::DatabaseCommand
- Inherits:
-
DevSystem::Command
- Object
- Liza::Unit
- Liza::Controller
- DevSystem::Command
- NetSystem::DatabaseCommand
- Defined in:
- lib/net_system/sub/database/commands/database_command.rb
Class Method Summary collapse
Methods inherited from DevSystem::Command
Methods inherited from Liza::Controller
color, inherited, on_connected
Methods inherited from Liza::Unit
const_missing, division, part, system, #system, test_class
Class Method Details
._red(s) ⇒ Object
28 29 30 |
# File 'lib/net_system/sub/database/commands/database_command.rb', line 28 def self._red s s.to_s.light_red end |
.call(args) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/net_system/sub/database/commands/database_command.rb', line 3 def self.call args log "args = #{args.inspect}" ruby_time = Time.now redis_time = NetBox[:database].redis.new.now mongo_time = NetBox[:database].mongo.new.now sqlite_time = NetBox[:database].sqlite.new.now mysql_time = NetBox[:database].mysql.new.now pgsql_time = NetBox[:database].pgsql.new.now # redis_time = ::RedisDb.current.now # mongo_time = ::MongoDb.current.now # sqlite_time = ::SqliteDb.current.now # mysql_time = ::MysqlDb.current.now # pgsql_time = ::PgsqlDb.current.now log "Time for Ruby: #{_red ruby_time}".bold log "Time for Redis: #{_red redis_time}".bold log "Time for Mongo: #{_red mongo_time}".bold log "Time for Sqlite: #{_red sqlite_time}".bold log "Time for Mysql: #{_red mysql_time}".bold log "Time for Pgsql: #{_red pgsql_time}".bold end |