bipbip 0.6.23 → 0.6.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/bipbip/plugin/mongodb.rb +8 -2
- data/lib/bipbip/version.rb +1 -1
- metadata +1 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: d84a0714c3feadc7135952068cd7e840862b57a3
         | 
| 4 | 
            +
              data.tar.gz: a60be602facabc2e5e2708687b5fece64c37a707
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: e47333bd8964340f6995954a9ada78f9bed04ec8422024b64ef6716a073232b90ef232f71c9ea27c2fd310d06dc8eb5fb4583dec05f2ae3b077e962f1a3e47c2
         | 
| 7 | 
            +
              data.tar.gz: 93e187100344e589c90f59b820c2da9f0b7ae14241247c906d00d3d91c74627d912f86617319d968d02af860c3fa751bef62d2d3a112aa5c6c4561fba18fb7cd
         | 
| @@ -68,8 +68,10 @@ module Bipbip | |
| 68 68 | 
             
                  data['slow_queries_time_avg'] = slow_queries_status['total']['time'].to_f / (slow_queries_status['total']['count'].to_f.nonzero? || 1)
         | 
| 69 69 | 
             
                  data['slow_queries_time_max'] = slow_queries_status['max']['time']
         | 
| 70 70 |  | 
| 71 | 
            -
                   | 
| 72 | 
            -
             | 
| 71 | 
            +
                  unless router?
         | 
| 72 | 
            +
                    data['total_index_size'] = all_index_size / (1024 * 1024)
         | 
| 73 | 
            +
                    data['total_index_size_percentage_of_memory'] = (all_index_size.to_f / total_system_memory.to_f) * 100
         | 
| 74 | 
            +
                  end
         | 
| 73 75 |  | 
| 74 76 | 
             
                  data
         | 
| 75 77 | 
             
                end
         | 
| @@ -125,6 +127,10 @@ module Bipbip | |
| 125 127 | 
             
                  `free -b`.lines.to_a[1].split[1].to_i
         | 
| 126 128 | 
             
                end
         | 
| 127 129 |  | 
| 130 | 
            +
                def router?
         | 
| 131 | 
            +
                  fetch_server_status['process'] == 'mongos'
         | 
| 132 | 
            +
                end
         | 
| 133 | 
            +
             | 
| 128 134 | 
             
                def fetch_slow_queries_status
         | 
| 129 135 | 
             
                  timestamp_last_check = slow_query_last_check
         | 
| 130 136 | 
             
                  time_period = Time.now - timestamp_last_check
         | 
    
        data/lib/bipbip/version.rb
    CHANGED