First off, I'm a huge fan of Sequel, big thanks to JE for maintaining such a fabulous library.
So, I am trying to profile memory use in my Padrino app, using the derailed_benchmarks <https://github.com/schneems/derailed_benchmarks> gem. This in turn uses the memory_profiler <https://github.com/SamSaffron/memory_profiler> gem for some commands. Static memory allocation profiling works fine, but when I try to profile objects created at Require time <https://github.com/schneems/derailed_benchmarks#objects-created-at-require-time> I get an error like this from this line <https://github.com/SamSaffron/memory_profiler/blob/master/lib/memory_profiler/helpers.rb#L28> : undefined method `name' for #<Sequel::SQL::Identifier @value=>:class> (NoMethodError) At first I thought I must have named a database table or row 'class', but I haven't. Upon investigation it appears to be the result of calling the :class method on an instance of Sequel::SQL::VirtualRow. Calling puts on the same object yields: `puts': can't convert Sequel::SQL::VirtualRow to Array (Sequel::SQL::VirtualRow#to_ary gives Sequel::SQL::Identifier) (TypeError) I see from the docs <http://sequel.jeremyevans.net/rdoc/classes/Sequel/SQL/VirtualRow.html> that these objects do indeed have most methods stripped - hence the unexpected behaviour calling :class on it. So my questions are: 1. Am I doing something wrong to have these rather hazardous objects instantiated in my app? 2. Can I prevent them from being created - or at least exposed in this way? 3. If answer is 'no' to 2., can the :class method be retained in these objects? If 2. and 3. draw a blank I'll have to suggest a patch to the maintainer of memory_profiler to prevent reliance on an object's :class method. *Using* Ruby 2.3.1 Sequel 4.32 derailed_benchmarks 1.3.1 memory_profiler 0.9.6 Any help much appreciated. Bruce -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
