71c747c0b3a1a99ab084cc206e7f5fe125f32654,ann_benchmarks/algorithms/base.py,BaseANN,get_index_size,#BaseANN#Any#,16

Before Change


                if "VmRSS" in line:
                    mem_usage = line.split(":")[1].strip()
                    usage, unit = mem_usage.split(" ")
                    val = int(usage)
                    // Assume output to be in kB
                    if unit == "B":
                            val /= 1000.0
                    if unit == "mB":
                            val *= 1e3
                    if unit == "gB":
                            val *= 1e6
                    return val
        except:
            print("Couldn"t open status file, no index size available.")
        return -1

After Change



    def get_index_size(self, process):
        Returns the size of the index in kB or -1 if not implemented.
        return psutil.Process().memory_info().rss / 1024  // return in kB for backwards compatibility

    def fit(self, X):
        pass
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: erikbern/ann-benchmarks
Commit Name: 71c747c0b3a1a99ab084cc206e7f5fe125f32654
Time: 2017-12-17
Author: mail@erikbern.com
File Name: ann_benchmarks/algorithms/base.py
Class Name: BaseANN
Method Name: get_index_size


Project Name: pantsbuild/pants
Commit Name: 411e0dcfe694b8f94e52d6f207dbadb28c925682
Time: 2020-11-02
Author: stuhood@gmail.com
File Name: src/python/pants/pantsd/process_manager.py
Class Name: ProcessManager
Method Name: _as_process


Project Name: pantsbuild/pants
Commit Name: 73c3c787abbe1ca71b900f11bb880e1de09c6d2a
Time: 2020-09-13
Author: john.sirois@gmail.com
File Name: src/python/pants/engine/process.py
Class Name:
Method Name: find_binary