Guest User

Untitled

a guest
Jan 16th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.44 KB | None | 0 0
  1. #!/usr/bin/env jruby
  2. require File.dirname(__FILE__) + '/../config/environment'
  3.  
  4. a = Ncp::Switch.all
  5. puts a.size
  6.  
  7. exit 0
  8.  
  9. =====
  10.  
  11. jruby --profile ./script/test.rb
  12. Profiling enabled; ^C shutdown will now dump profile info
  13. 749
  14.  
  15. main thread profile results:
  16. Total time: 117.61
  17.  
  18. total self children calls method
  19. ----------------------------------------------------------------
  20. 95.32 0.00 95.32 1807 BasicObject#__send__
  21. 94.74 0.00 94.74 1 ActiveRecord::Base.all
  22. 94.65 0.00 94.65 1 ActiveRecord::FinderMethods#all
  23. 94.65 0.00 94.65 1 ActiveRecord::Relation#to_a
  24. 93.31 0.00 93.31 1 ActiveRecord::Base.find_by_sql
  25. 92.86 0.01 92.85 1 Array#collect!
  26. 92.85 0.03 92.82 749 ActiveRecord::Base.instantiate
  27. 92.68 0.01 92.67 749 ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods#primary_key
  28. 92.67 0.01 92.67 749 ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods#reset_primary_key
  29. 92.54 0.02 92.52 749 ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods#get_primary_key
  30. 67.29 64.19 3.10 751 ActiveRecord::ConnectionAdapters::JdbcConnection#columns
  31. 67.10 0.01 67.09 750 ActiveRecord::ConnectionAdapters::JdbcAdapter#table_exists?
  32. 67.09 0.01 67.08 750 ActiveRecord::ConnectionAdapters::JdbcAdapter#jdbc_columns
  33. 25.44 0.01 25.43 750 ActiveRecord::ConnectionAdapters::JdbcAdapter#primary_key
  34. 25.43 0.00 25.43 750 ActiveRecord::ConnectionAdapters::JdbcAdapter#primary_keys
  35. 25.43 25.43 0.00 750 ActiveRecord::ConnectionAdapters::JdbcConnection#primary_keys
  36. 22.68 0.15 22.52 4487 Kernel#require
  37. 21.21 0.00 21.21 152 Kernel#require
  38. 16.19 0.29 15.90 14220 Array#each
  39. 9.59 0.09 9.51 21119 Class#new
  40. 8.56 0.03 8.54 1003 ActiveSupport::Dependencies#new_constants_in
  41. 8.38 0.01 8.37 1001 ActiveSupport::Dependencies::Loadable#load_dependency
  42. 7.02 0.01 7.01 990 ActiveSupport::Dependencies::Loadable#require
  43. 6.10 0.00 6.10 1 Bundler.require
  44. 6.10 0.00 6.10 1 Bundler::Runtime#require
  45. 6.08 0.00 6.08 2 Bundler.setup
  46. 5.65 0.07 5.58 25976 Kernel#send
  47. 4.83 0.00 4.83 1 Bundler::Runtime#setup
  48. 4.06 0.20 3.86 16541 Proc#call
  49. 3.90 0.00 3.90 2 Rails::Railtie::Configurable::ClassMethods#method_missing
  50. 3.90 0.00 3.90 1 Rails::Application#initialize!
  51. 3.90 0.00 3.90 1 Rails::Initializable#run_initializers
  52. 3.72 0.00 3.72 66 Rails::Initializable::Initializer#run
  53. 3.72 0.01 3.70 68 BasicObject#instance_exec
  54. 3.66 0.00 3.66 1 Bundler::Environment#requested_specs
  55. 3.66 0.00 3.66 1 Bundler::Definition#requested_specs
  56. 3.66 0.00 3.66 1 Bundler::Definition#specs_for
  57. 3.61 0.00 3.61 1 Bundler::Definition#specs
  58. 3.48 0.01 3.47 3 Bundler::Definition#resolve
  59. 3.40 0.01 3.39 132 Array#reverse_each
  60. 3.03 0.32 2.71 13518 ActiveRecord::ConnectionAdapters::JdbcColumn#initialize
  61. 2.88 0.09 2.79 1762 Kernel#catch
  62. 2.61 0.01 2.59 13 Kernel#load
  63. 2.42 0.00 2.42 11 ActiveSupport::Dependencies::Loadable#load
  64. 2.09 0.00 2.09 1 Bundler::Resolver.resolve
  65. 2.09 0.00 2.08 1 Bundler::Resolver#start
  66. 2.08 0.00 2.08 86 Bundler::Resolver#resolve
  67. 2.03 0.19 1.84 68016 Hash#[]
  68. 2.01 0.00 2.01 54 Bundler::Resolver#resolve_requirement
  69. 1.60 0.46 1.15 1136 Module#module_eval
Add Comment
Please, Sign In to add comment