92c2e41dfdb30756a5872578b38b34cd34722d76,python/ray/state.py,GlobalState,profile_table,#GlobalState#,479

Before Change


                                        "*")
        batch_identifiers_binary = [
            key[len(gcs_utils.TablePrefix_PROFILE_string):]
            for key in profile_table_keys
        ]

        result = defaultdict(list)

After Change


        self._check_connected()

        result = defaultdict(list)
        profile_table = self.global_state_accessor.get_profile_table()
        for i in range(len(profile_table)):
            profile = gcs_utils.ProfileTableData.FromString(profile_table[i])

            component_type = profile.component_type
            component_id = binary_to_hex(profile.component_id)
            node_ip_address = profile.node_ip_address

            for event in profile.profile_events:
                try:
                    extra_data = json.loads(event.extra_data)
                except ValueError:
                    extra_data = {}
                profile_event = {
                    "event_type": event.event_type,
                    "component_id": component_id,
                    "node_ip_address": node_ip_address,
                    "component_type": component_type,
                    "start_time": event.start_time,
                    "end_time": event.end_time,
                    "extra_data": extra_data
                }

                result[component_id].append(profile_event)

        return dict(result)

    def _seconds_to_microseconds(self, time_in_seconds):
        A helper function for converting seconds to microseconds.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 13

Instances


Project Name: ray-project/ray
Commit Name: 92c2e41dfdb30756a5872578b38b34cd34722d76
Time: 2020-05-24
Author: dooku.wt@antfin.com
File Name: python/ray/state.py
Class Name: GlobalState
Method Name: profile_table


Project Name: ray-project/ray
Commit Name: 92c2e41dfdb30756a5872578b38b34cd34722d76
Time: 2020-05-24
Author: dooku.wt@antfin.com
File Name: python/ray/state.py
Class Name: GlobalState
Method Name: profile_table


Project Name: ray-project/ray
Commit Name: 765d470c409dec3f599858b6a8ec7199eb8f2fa8
Time: 2020-05-25
Author: 869218239a@zju.edu.cn
File Name: python/ray/state.py
Class Name: GlobalState
Method Name: object_table


Project Name: ray-project/ray
Commit Name: 35eeec5647b378a980c3e7051ce87a9649c7bb95
Time: 2020-05-29
Author: 869218239a@zju.edu.cn
File Name: python/ray/state.py
Class Name: GlobalState
Method Name: actor_table