Class: Gitlab::Database::PostgresIndex
- Inherits:
-
SharedModel
- Object
- ActiveRecord::Base
- SharedModel
- Gitlab::Database::PostgresIndex
show all
- Includes:
- Utils::StrongMemoize
- Defined in:
- lib/gitlab/database/postgres_index.rb
Instance Method Summary
collapse
Methods inherited from SharedModel
connection, #connection_db_config, connection_pool, using_connection
Instance Method Details
#bloat_size ⇒ Object
47
48
49
|
# File 'lib/gitlab/database/postgres_index.rb', line 47
def bloat_size
strong_memoize(:bloat_size) { bloat_estimate&.bloat_size || 0 }
end
|
#relative_bloat_level ⇒ Object
51
52
53
|
# File 'lib/gitlab/database/postgres_index.rb', line 51
def relative_bloat_level
bloat_size / ondisk_size_bytes.to_f
end
|
#reset ⇒ Object
42
43
44
45
|
# File 'lib/gitlab/database/postgres_index.rb', line 42
def reset
reload clear_memoization(:bloat_size)
end
|
#to_s ⇒ Object
55
56
57
|
# File 'lib/gitlab/database/postgres_index.rb', line 55
def to_s
name
end
|