Giter VIP home page Giter VIP logo

Comments (4)

forresty avatar forresty commented on September 27, 2024

FYI here is a normal stackprof output:

$ stackprof tmp/stackprof-cpu-13485-1422007173.dump --limit 10
==================================
  Mode: cpu(1000)
  Samples: 28 (17.65% miss rate)
  GC: 2 (7.14%)
==================================
     TOTAL    (pct)     SAMPLES    (pct)     FRAME
         3  (10.7%)           2   (7.1%)     ActiveRecord::LazyAttributeHash#[]
         4  (14.3%)           2   (7.1%)     block in ActiveSupport::Dependencies::Loadable#require
         2   (7.1%)           2   (7.1%)     ThreadSafe::NonConcurrentCacheBackend#[]
         1   (3.6%)           1   (3.6%)     ActiveRecord::LazyAttributeHash#assign_default_value
         1   (3.6%)           1   (3.6%)     ActiveSupport::HashWithIndifferentAccess#update
         1   (3.6%)           1   (3.6%)     ActiveModel::AttributeMethods::ClassMethods#define_proxy_call
         1   (3.6%)           1   (3.6%)     block in ActiveRecord::Result#hash_rows
         1   (3.6%)           1   (3.6%)     ActiveRecord::Relation::Merger#filter_binds
         1   (3.6%)           1   (3.6%)     <module:Associations>
         2   (7.1%)           1   (3.6%)     <module:Associations>

from makara.

mnelson avatar mnelson commented on September 27, 2024

Can you try pulling new_relic and see what the traces looks like?

from makara.

mnelson avatar mnelson commented on September 27, 2024

Also, thank you. This is helpful. I'd love to track this down.

from makara.

forresty avatar forresty commented on September 27, 2024

Thanks, pulling newrelic and the performance now seems fine:

without makara:

$ http_load -parallel 10 -seconds 10 urls.txt 
1287 fetches, 10 max parallel, 9.26704e+06 bytes, in 10 seconds
7200.5 mean bytes/connection
128.7 fetches/sec, 926704 bytes/sec
msecs/connect: 0.0838073 mean, 0.31 max, 0.032 min
msecs/first-response: 77.298 mean, 1101 max, 22.64 min
HTTP response codes:
  code 200 -- 1287

with makara:

$ http_load -parallel 10 -seconds 10 urls.txt 
1295 fetches, 10 max parallel, 9.5496e+06 bytes, in 10 seconds
7374.21 mean bytes/connection
129.5 fetches/sec, 954959 bytes/sec
msecs/connect: 0.0919042 mean, 0.638 max, 0.031 min
msecs/first-response: 76.8999 mean, 1177.08 max, 20.856 min
HTTP response codes:
  code 200 -- 1295

full stackprof output:

$ stackprof tmp/stackprof-cpu-10023-1422039178.dump
==================================
  Mode: cpu(1000)
  Samples: 26 (0.00% miss rate)
  GC: 0 (0.00%)
==================================
     TOTAL    (pct)     SAMPLES    (pct)     FRAME
         2   (7.7%)           2   (7.7%)     block in ActiveSupport::Dependencies::Loadable#require
         1   (3.8%)           1   (3.8%)     <module:Associations>
         1   (3.8%)           1   (3.8%)     singleton class
         2   (7.7%)           1   (3.8%)     singleton class
         1   (3.8%)           1   (3.8%)     block (2 levels) in Net::HTTPResponse::Inflater#inflate_adapter
         1   (3.8%)           1   (3.8%)     block in Net::HTTP#connect
         1   (3.8%)           1   (3.8%)     Net::HTTP#begin_transport
         1   (3.8%)           1   (3.8%)     ActiveSupport::HashWithIndifferentAccess#default
         1   (3.8%)           1   (3.8%)     #<Module:0x007ff0c263eee8>.set_name_cache
         1   (3.8%)           1   (3.8%)     ActiveModel::AttributeMethods::ClassMethods#define_proxy_call
         1   (3.8%)           1   (3.8%)     ActiveRecord::Scoping::ScopeRegistry#raise_invalid_scope_type!
         1   (3.8%)           1   (3.8%)     <module:Associations>
         1   (3.8%)           1   (3.8%)     ActiveSupport::JSON::Encoding::JSONGemEncoder::EscapedString#to_json
         2   (7.7%)           1   (3.8%)     ActiveRecord::Reflection::AssociationReflection#association_class
         1   (3.8%)           1   (3.8%)     ActiveModel::AttributeMethods::ClassMethods#define_proxy_call
         1   (3.8%)           1   (3.8%)     block in ActiveRecord::AttributeMethods::AttributeMethodCache#[]
         1   (3.8%)           1   (3.8%)     block in ActiveRecord::DynamicMatchers::Method.match
         1   (3.8%)           1   (3.8%)     block in ActiveRecord::AttributeMethods::AttributeMethodCache#[]
         1   (3.8%)           1   (3.8%)     <module:ActiveRecord>
         1   (3.8%)           1   (3.8%)     block in Arel::Visitors::Visitor.dispatch_cache
         1   (3.8%)           1   (3.8%)     ActiveRecord::QueryMethods#where!
         1   (3.8%)           1   (3.8%)     ThreadSafe::Cache#initialize
         2   (7.7%)           1   (3.8%)     ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter#configure_connection
         1   (3.8%)           1   (3.8%)     Set#include?
         4  (15.4%)           1   (3.8%)     Makara::Proxy#initialize
         1   (3.8%)           0   (0.0%)     Net::HTTP#do_start
        52 (200.0%)           0   (0.0%)     Grape::Middleware::Base#call
        26 (100.0%)           0   (0.0%)     #<Class:0x007ff0c3dd9008>#call
        26 (100.0%)           0   (0.0%)     #<Class:0x007ff0c3dd9620>#call
        26 (100.0%)           0   (0.0%)     #<Class:0x007ff0c3dd9620>#call

from makara.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.