Guest User

Untitled

a guest
Feb 21st, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.45 KB | None | 0 0
  1. # Profiling result of inserting 10000 objects into MySQL, SQLITE, Tokyo Cabinet, and Tokyo Cabinet adapter disabling connection to TC iteself.
  2. # Each object is consist of 5 attributes.
  3. # For MySQL and SQLITE, index is set on each attribute.
  4. # For Tokyo Cabinet, Datafile for each attribute is created with reverse ID lookup to a datafile which has id&marshalled object as key&value pair.
  5.  
  6. # TC disabled
  7.  
  8. Thread ID: 218880
  9. Total: 67.673687
  10.  
  11. %self total self wait child calls name
  12. 8.78 18.84 5.94 0.00 12.90 200001 <Module::DataMapper>#repository
  13. 5.24 5.27 3.54 0.00 1.73 400013 <Class::DataMapper::Repository>#context
  14. 4.85 31.26 3.28 0.00 27.98 200001 DataMapper::Model#repository
  15. 4.04 35.50 2.73 0.00 32.76 290207 Array#each
  16. 3.99 6.27 2.70 0.00 3.57 200001 DataMapper::Repository#initialize
  17. 3.94 8.73 2.66 0.00 6.06 200012 DataMapper::Model#repository_name
  18. 2.99 34.11 2.02 0.00 32.09 180001 DataMapper::Resource#properties
  19. 2.90 3.24 1.96 0.00 1.28 100000 DataMapper::Property#set_original_value
  20. 2.88 6.14 1.95 0.00 4.19 30029 Hash#each
  21. 2.77 33.55 1.87 0.00 31.68 220001 DataMapper::Resource#repository
  22. 2.34 1.88 1.58 0.00 0.30 360030 Array#each-1
  23. 1.96 19.28 1.32 0.00 17.96 190308 Class#new
  24. 1.94 3.57 1.31 0.00 2.26 200021 DataMapper::Assertions#assert_kind_of
  25. 1.93 2.08 1.30 0.00 0.78 200022 DataMapper::Model#default_repository_name
  26. 1.88 7.61 1.27 0.00 6.33 50000 DataMapper::Property#get
  27. 1.81 1.66 1.23 0.00 0.43 190007 DataMapper::Model#properties
  28. 1.80 6.56 1.22 0.00 5.34 50000 DataMapper::Property#set
  29. 1.70 1.55 1.15 0.00 0.40 180000 DataMapper::PropertySet#[]
  30. 1.42 1.41 0.96 0.00 0.45 210170 Enumerable#any?
  31. 1.41 0.95 0.95 0.00 0.00 450002 Kernel#model
  32. 1.40 0.99 0.95 0.00 0.05 400825 Hash#[]
  33. 1.38 1.37 0.93 0.00 0.44 50000 DataMapper::Property#typecast
  34. 1.36 1.34 0.92 0.00 0.42 200011 Enumerable#detect
  35. 1.34 1.50 0.90 0.00 0.60 90000 DataMapper::Property#value
  36. 1.32 1.27 0.89 0.00 0.38 60005 DataMapper::Property#hash
  37. 1.31 1.26 0.89 0.00 0.37 140000 DataMapper::Property#get!
  38. 1.29 0.87 0.87 0.00 0.00 400013 Thread#[]
  39. 1.27 0.86 0.86 0.00 0.00 400013 <Class::Thread>#current
  40. 1.25 0.85 0.85 0.00 0.00 400002 Kernel#block_given?
  41. 1.24 1.26 0.84 0.00 0.42 100000 DataMapper::Property#lazy_load
  42. 1.18 14.91 0.80 0.00 14.12 70000 DataMapper::Resource#attribute_loaded?
  43. 1.15 0.78 0.78 0.00 0.00 200023 <Class::DataMapper::Repository>#default_name
  44. 1.11 0.75 0.75 0.00 0.00 180000 DataMapper::Resource#original_values
  45.  
  46. #TC Enabled
  47.  
  48. makoto-inoues-macbook:datamapper-threaded-benchmark makoto$ ruby-prof create.rb
  49. Thread ID: 218880
  50. Total: 141.953138
  51.  
  52. %self total self wait child calls name
  53. 22.94 32.56 32.56 0.00 0.00 50000 TokyoCabinet::BDB#close
  54. 13.14 18.66 18.66 0.00 0.00 40000 TokyoCabinet::BDB#putlist
  55. 5.13 23.68 7.28 0.00 16.41 250001 <Module::DataMapper>#repository
  56. 2.95 4.18 4.18 0.00 0.00 50000 TokyoCabinet::BDB#initialize
  57. 2.84 5.98 4.03 0.00 1.96 450013 <Class::DataMapper::Repository>#context
  58. 2.74 73.73 3.89 0.00 69.83 50000 DataMapper::Adapters::TokyoCabinetAdapter#access_data
  59. 2.55 3.61 3.61 0.00 0.00 50000 TokyoCabinet::BDB#open
  60. 2.51 8.13 3.56 0.00 4.57 250001 DataMapper::Repository#initialize
  61. 2.31 36.21 3.28 0.00 32.93 340207 Array#each
  62. 2.18 31.35 3.09 0.00 28.26 200001 DataMapper::Model#repository
  63. 1.88 8.75 2.66 0.00 6.09 200012 DataMapper::Model#repository_name
  64. 1.54 26.65 2.18 0.00 24.47 300308 Class#new
  65. 1.48 72.72 2.10 0.00 70.62 30029 Hash#each
  66. 1.43 34.12 2.03 0.00 32.09 180001 DataMapper::Resource#properties
  67. 1.40 3.27 1.98 0.00 1.28 100000 DataMapper::Property#set_original_value
  68. 1.34 33.68 1.91 0.00 31.77 220001 DataMapper::Resource#repository
  69. 1.18 4.57 1.67 0.00 2.89 250021 DataMapper::Assertions#assert_kind_of
  70. 1.13 1.90 1.61 0.00 0.30 360030 Array#each-1
  71. 1.05 2.55 1.49 0.00 1.06 60000 DataMapper::Repository#adapter
  72. 0.92 2.08 1.30 0.00 0.78 200022 DataMapper::Model#default_repository_name
  73. 0.90 7.60 1.28 0.00 6.32 50000 DataMapper::Property#get
  74. 0.87 1.29 1.24 0.00 0.05 520825 Hash#[]
  75. 0.87 6.66 1.24 0.00 5.42 50000 DataMapper::Property#set
  76. 0.87 1.67 1.23 0.00 0.43 190007 DataMapper::Model#properties
  77. 0.81 1.56 1.16 0.00 0.40 180000 DataMapper::PropertySet#[]
  78.  
  79. # MySQL(NOTE: DataObject is c extension database driver)
  80.  
  81. Thread ID: 218880
  82. Total: 102.887286
  83.  
  84. %self total self wait child calls name
  85. 6.30 20.69 6.48 0.00 14.22 140002 <Module::DataMapper>#repository
  86. 4.53 16.59 4.66 0.00 11.93 30029 Hash#each
  87. 3.76 5.76 3.87 0.00 1.89 280014 <Class::DataMapper::Repository>#context
  88. 3.69 56.70 3.80 0.00 52.90 250207 Array#each
  89. 3.43 34.29 3.53 0.00 30.77 140002 DataMapper::Model#repository
  90. 3.03 5.10 3.11 0.00 1.99 220000 DataMapper::Property#value
  91. 2.91 6.95 2.99 0.00 3.96 140002 DataMapper::Repository#initialize
  92. 2.83 9.61 2.91 0.00 6.69 140012 DataMapper::Model#repository_name
  93. 2.55 3.74 2.62 0.00 1.12 120005 DataMapper::Property#hash
  94. 2.09 36.90 2.15 0.00 34.75 160001 DataMapper::Resource#repository
  95. 2.08 3.69 2.14 0.00 1.55 50000 DataMapper::Property#set_original_value
  96. 1.82 31.43 1.87 0.00 29.56 110001 DataMapper::Resource#properties
  97. 1.80 10.11 1.85 0.00 8.26 50000 DataMapper::Property#set
  98. 1.74 27.59 1.79 0.00 25.80 150310 Class#new
  99. 1.60 2.65 1.64 0.00 1.01 390438 Hash#[]
  100. 1.47 2.04 1.51 0.00 0.53 160000 DataMapper::PropertySet#[]
  101. 1.45 1.82 1.50 0.00 0.32 220038 Array#each-1
  102. 1.43 2.19 1.47 0.00 0.72 50000 DataMapper::Property#typecast
  103. 1.43 3.96 1.47 0.00 2.49 140022 DataMapper::Assertions#assert_kind_of
  104. 1.41 2.32 1.45 0.00 0.88 140022 DataMapper::Model#default_repository_name
  105. 1.34 2.15 1.38 0.00 0.77 30000 DataObjects::Quoting#quote_value
  106. 1.32 1.92 1.36 0.00 0.56 140000 DataMapper::Property#get!
  107. 1.27 1.76 1.31 0.00 0.45 130007 DataMapper::Model#properties
  108. 1.25 1.29 1.29 0.00 0.00 220000 DataMapper::Property#custom?
  109. 1.14 1.17 1.17 0.00 0.00 360021 Kernel#hash
  110. 1.05 3.10 1.08 0.00 2.02 140863 Hash#[]=
  111. 1.05 1.72 1.08 0.00 0.64 150012 Enumerable#detect
  112. 1.05 1.59 1.08 0.00 0.52 150171 Enumerable#any?
  113. 0.73 3.75 0.75 0.00 3.00 10000 DataMapper::Adapters::DataObjectsAdapter::SQL#create_statement
  114. 0.46 0.92 0.48 0.00 0.44 20000 DataMapper::Adapters::AbstractAdapter::Transaction#current_transaction
  115. 0.33 1.34 0.34 0.00 1.00 20000 DataMapper::Adapters::AbstractAdapter::Transaction#within_transaction?
  116. 0.32 0.47 0.32 0.00 0.14 30000 DataMapper::Adapters::MysqlAdapter::SQL#quote_column_name
  117. 0.27 3.18 0.28 0.00 2.91 10000 DataObjects::Quoting#escape_sql
  118. 0.27 3.49 0.27 0.00 3.21 10000 DataMapper::Adapters::DataObjectsAdapter#close_connection
  119. 0.20 3.59 0.21 0.00 3.38 10000 DataMapper::Adapters::DataObjectsAdapter#create_connection
  120. 0.19 34.11 0.19 0.00 33.91 10000 DataMapper::Adapters::DataObjectsAdapter#create
  121. 0.16 2.02 0.16 0.00 1.86 10000 <Class::DataObjects::Mysql::Connection>#new
  122. 0.15 0.16 0.16 0.00 0.00 20001 <Class::DataObjects::Mysql::Connection>#__pool_lock
  123. 0.12 0.12 0.12 0.00 0.00 20000 DataObjects::Mysql::Command#quote_string
  124. 0.12 0.12 0.12 0.00 0.00 20003 <Class::DataMapper::Repository>#adapters
  125. 0.11 0.31 0.12 0.00 0.20 10000 DataMapper::Adapters::MysqlAdapter::SQL#quote_table_name
  126. 0.09 0.10 0.10 0.00 0.00 10000 <Class::DataObjects::Mysql::Connection>#__pool_wait
  127. 0.00 0.00 0.00 0.00 0.00 1 DataObjects::Mysql::Connection#initialize
  128. 0.00 0.00 0.00 0.00 0.00 1 <Class::DataObjects::Mysql::Connection>#pool_size
  129.  
  130. # Sqlite
  131.  
  132. Thread ID: 218880
  133. Total: 115.090244
  134.  
  135. %self total self wait child calls name
  136. 9.97 15.12 11.47 0.00 3.64 10000 DataObjects::Sqlite3::Command#execute_non_query
  137. 5.65 20.62 6.51 0.00 14.11 140002 <Module::DataMapper>#repository
  138. 4.10 16.73 4.72 0.00 12.02 30029 Hash#each
  139. 3.42 68.58 3.94 0.00 64.64 250205 Array#each
  140. 3.40 5.83 3.92 0.00 1.91 280014 <Class::DataMapper::Repository>#context
  141. 2.97 34.22 3.42 0.00 30.80 140002 DataMapper::Model#repository
  142. 2.75 5.17 3.16 0.00 2.01 220000 DataMapper::Property#value
  143. 2.55 9.73 2.94 0.00 6.79 140012 DataMapper::Model#repository_name
  144. 2.52 6.81 2.91 0.00 3.90 140002 DataMapper::Repository#initialize
  145. 2.32 3.81 2.67 0.00 1.13 120005 DataMapper::Property#hash
  146. 1.90 3.81 2.19 0.00 1.62 50000 DataMapper::Property#set_original_value
  147. 1.88 36.85 2.16 0.00 34.69 160001 DataMapper::Resource#repository
  148. 1.62 31.43 1.87 0.00 29.57 110001 DataMapper::Resource#properties
  149. 1.62 10.25 1.86 0.00 8.39 50000 DataMapper::Property#set
  150. 1.60 27.65 1.85 0.00 25.80 150308 Class#new
  151. 1.42 2.64 1.64 0.00 1.00 390438 Hash#[]
  152. 1.33 2.06 1.53 0.00 0.54 160000 DataMapper::PropertySet#[]
  153. 1.32 1.85 1.52 0.00 0.32 220036 Array#each-1
  154. 1.28 2.18 1.48 0.00 0.70 50000 DataMapper::Property#typecast
  155. 1.27 2.34 1.46 0.00 0.87 140022 DataMapper::Model#default_repository_name
  156. 1.25 3.90 1.44 0.00 2.47 140022 DataMapper::Assertions#assert_kind_of
  157. 1.22 1.99 1.40 0.00 0.59 30000 DataObjects::Quoting#quote_value
  158. 1.18 1.95 1.36 0.00 0.58 140000 DataMapper::Property#get!
  159. 1.15 1.78 1.33 0.00 0.45 130007 DataMapper::Model#properties
  160. 1.13 1.30 1.30 0.00 0.00 220000 DataMapper::Property#custom?
  161. 0.78 4.57 0.90 0.00 3.66 10000 DataMapper::Adapters::DataObjectsAdapter::SQL#create_statement
  162. 0.50 23.58 0.58 0.00 23.00 10000 DataMapper::Adapters::DataObjectsAdapter#with_connection
  163. 0.45 2.90 0.52 0.00 2.38 10000 <Class::DataObjects::Connection>#new
  164. 0.29 0.52 0.34 0.00 0.18 30000 DataMapper::Adapters::DataObjectsAdapter::SQL#quote_column_name
  165. 0.26 3.71 0.29 0.00 3.41 10000 DataMapper::Adapters::DataObjectsAdapter#close_connection
  166. 0.25 3.05 0.28 0.00 2.77 10000 DataObjects::Quoting#escape_sql
  167. 0.20 0.87 0.23 0.00 0.64 10000 DataMapper::Adapters::DataObjectsAdapter::SQL#quote_table_name
  168. 0.19 3.62 0.22 0.00 3.40 10000 DataMapper::Adapters::DataObjectsAdapter#create_connection
  169. 0.18 45.92 0.21 0.00 45.71 10000 DataMapper::Adapters::DataObjectsAdapter#create
  170. 0.17 0.20 0.20 0.00 0.00 10000 DataObjects::Result#initialize
  171. 0.16 0.21 0.18 0.00 0.03 10000 DataObjects::Command#initialize
  172. 0.14 1.97 0.16 0.00 1.81 10000 <Class::DataObjects::Sqlite3::Connection>#new
  173. 0.14 0.16 0.16 0.00 0.00 20001 <Class::DataObjects::Sqlite3::Connection>#__pool_lock
  174. 0.12 0.17 0.14 0.00 0.03 10001 <Class::DataObjects::URI>#parse
  175. 0.12 23.71 0.13 0.00 23.58 10000 DataMapper::Adapters::DataObjectsAdapter#execute
  176. 0.11 0.56 0.13 0.00 0.43 10000 DataObjects::Connection#create_command
  177. 0.10 0.11 0.11 0.00 0.00 20000 DataObjects::Sqlite3::Command#quote_string
  178. 0.09 0.10 0.10 0.00 0.00 10000 DataObjects::Result#to_i
  179. 0.09 0.10 0.10 0.00 0.00 10000 <Class::DataObjects::Sqlite3::Connection>#__pool_wait
  180. 0.06 0.07 0.07 0.00 0.00 20002 DataObjects::URI#scheme
  181. 0.05 0.06 0.06 0.00 0.00 9999 <Object::DataObjects::Sqlite3::Connection>#concrete_command
  182. 0.05 0.06 0.06 0.00 0.00 10000 DataMapper::Adapters::DataObjectsAdapter::SQL#supports_default_values?
  183. 0.05 0.06 0.06 0.00 0.00 10000 <Module::DataObjects::Sqlite3>#logger
  184. 0.05 0.06 0.06 0.00 0.00 10000 DataMapper::Adapters::DataObjectsAdapter::SQL#supports_returning?
  185. 0.03 0.04 0.04 0.00 0.00 10000 DataObjects::Sqlite3::Command#quote_boolean
  186. 0.00 0.00 0.00 0.00 0.00 1 DataObjects::Sqlite3::Connection#initialize
  187. 0.00 0.00 0.00 0.00 0.00 1 DataObjects::Connection#concrete_command
  188. 0.00 0.00 0.00 0.00 0.00 1 <Class::DataObjects::Connection>#inherited
  189. 0.00 0.00 0.00 0.00 0.00 1 DataObjects::Logger#set_log
  190. 0.00 0.00 0.00 0.00 0.00 1 DataMapper::Adapters::DataObjectsAdapter#initialize
  191. 0.00 0.00 0.00 0.00 0.00 1 DataMapper::Adapters::DataObjectsAdapter#normalize_uri
  192. 0.00 0.00 0.00 0.00 0.00 1 DataObjects::Logger#reset_methods
  193. 0.00 0.00 0.00 0.00 0.00 1 <Class::DataObjects::Sqlite3::Connection>#__new
  194. 0.00 0.00 0.00 0.00 0.00 1 DataObjects::Logger#level=
  195. 0.00 0.00 0.00 0.00 0.00 1 DataObjects::Logger#initialize_log
  196. 0.00 0.00 0.00 0.00 0.00 1 <Class::DataObjects::URI>#new
  197. 0.00 0.00 0.00 0.00 0.00 1 DataObjects::Logger#initialize
  198. 0.00 0.00 0.00 0.00 0.00 2 <Module::DataObjects::Sqlite3>#logger=
  199. 0.00 0.00 0.00 0.00 0.00 1 <Class::DataObjects::URI>#allocate
  200. 0.00 0.00 0.00 0.00 0.00 1 <Class::DataObjects::Sqlite3::Connection>#pool_size
  201. 0.00 0.00 0.00 0.00 0.00 1 DataObjects::URI#path
Add Comment
Please, Sign In to add comment