Module ActiveLdap::ActionController::LdapBenchmarking
In: lib/active_ldap/action_controller/ldap_benchmarking.rb
Error AttributeAssignmentError AdapterNotSpecified OperationNotPermitted RequiredObjectClassMissed ConnectionError RequiredAttributeMissed LdifInvalid LdapError DistinguishedNameNotSetError EntryNotFound SaveError StrongAuthenticationRequired AdapterNotFound ConnectionNotEstablished TimeoutError AuthenticationError AttributeValueInvalid EntryNotSaved DistinguishedNameInputInvalid EntryAlreadyExist ObjectClassError UnknownAttribute EntryInvalid DeleteError ConfigurationError DistinguishedNameInvalid DistinguishedName Base Reloadable::Deprecated Reloadable::Subclasses Enumerable Ldif Collection EntryAttribute StandardError Children HasManyWrap HasMany BelongsToMany Proxy BelongsTo Common Find LDIF Delete Update Normalizable GetText Parser ActiveRecord::Callbacks ActiveRecord::Validations Base\n[lib/active_ldap/adapter/base.rb\nlib/active_ldap/adapter/jndi.rb\nlib/active_ldap/adapter/ldap.rb\nlib/active_ldap/adapter/net_ldap.rb] Jndi Ldap NetLdap GetTextSupport Schema\n[lib/active_ldap/schema.rb\nlib/active_ldap/schema/syntaxes.rb] JndiConnection lib/active_ldap/distinguished_name.rb lib/active_ldap/base.rb lib/active_ldap/schema.rb lib/active_ldap/entry_attribute.rb lib/active_ldap/ldif.rb lib/active_ldap/ldap_error.rb ClassMethods Associations LdapBenchmarking ActionController Populate lib/active_ldap/association/has_many_wrap.rb lib/active_ldap/association/children.rb lib/active_ldap/association/collection.rb lib/active_ldap/association/proxy.rb lib/active_ldap/association/belongs_to_many.rb lib/active_ldap/association/belongs_to.rb lib/active_ldap/association/has_many.rb HasManyUtils Association ClassMethods Tree Acts Command Update Common ModifyNameRecordLoadable AddOperationModifiable DeleteOperationModifiable ReplaceOperationModifiable ModifyRecordLoadable DeleteRecordLoadable AddRecordLoadable ContentRecordLoadable LDIF Delete Find Operations GetTextSupport Escape ClassMethods Normalizable Attributes ClassMethods Configuration ClassMethods ObjectClass lib/active_ldap/get_text/parser.rb GetText ClassMethods Callbacks Validations lib/active_ldap/adapter/jndi_connection.rb lib/active_ldap/adapter/net_ldap.rb lib/active_ldap/adapter/ldap.rb lib/active_ldap/adapter/jndi.rb Adapter Helper GetTextFallback ClassMethods HumanReadable Salt UserPassword ClassMethods Connection ActiveLdap dot/m_44_0.png

Methods

Public Class methods

[Source]

   # File lib/active_ldap/action_controller/ldap_benchmarking.rb, line 4
4:       def self.included(base)
5:         base.class_eval do
6:           alias_method_chain :render, :active_ldap_benchmark
7:           alias_method_chain :rendering_runtime, :active_ldap
8:         end
9:       end

Protected Instance methods

[Source]

    # File lib/active_ldap/action_controller/ldap_benchmarking.rb, line 12
12:       def render_with_active_ldap_benchmark(*args, &block)
13:         if logger
14:           @ldap_runtime_before_render = ActiveLdap::Base.reset_runtime
15:           result = render_without_active_ldap_benchmark(*args, &block)
16:           @ldap_runtime_after_render = ActiveLdap::Base.reset_runtime
17:           @rendering_runtime -= @ldap_runtime_after_render
18:           result
19:         else
20:           render_without_active_ldap_benchmark(*args, &block)
21:         end
22:       end

Private Instance methods

[Source]

    # File lib/active_ldap/action_controller/ldap_benchmarking.rb, line 25
25:       def rendering_runtime_with_active_ldap(runtime)
26:         result = rendering_runtime_without_active_ldap(runtime)
27:         ldap_runtime = ActiveLdap::Base.reset_runtime
28:         ldap_runtime += @ldap_runtime_before_render || 0
29:         ldap_runtime += @ldap_runtime_after_render || 0
30:         ldap_percentage = ldap_runtime * 100 / runtime
31:         result + (" | LDAP: %.5f (%d%%)" % [ldap_runtime, ldap_percentage])
32:       end

[Validate]