8fac40d5bb7b75da9ba26d7fa34e30c18b954e33,src/python/pants/goal/run_tracker.py,RunTracker,initialize,#RunTracker#Any#,200

Before Change


    // Select a globally unique ID for the run, that sorts by time.
    millis = int((self._run_timestamp * 1000) % 1000)
    // run_uuid is used as a part of run_id and also as a trace_id for Zipkin tracing
    run_uuid = uuid.uuid4().hex
    str_time = time.strftime("%Y_%m_%d_%H_%M_%S", time.localtime(self._run_timestamp))
    run_id = f"pants_run_{str_time}_{millis}_{run_uuid}"

    info_dir = os.path.join(self.get_options().pants_workdir, self.options_scope)
    self.run_info_dir = os.path.join(info_dir, run_id)
    self.run_info = RunInfo(os.path.join(self.run_info_dir, "info"))
    self.run_info.add_basic_info(run_id, self._run_timestamp)
    self.run_info.add_info("cmd_line", self._cmd_line)

    // Create a "latest" symlink, after we add_infos, so we"re guaranteed that the file exists.
    link_to_latest = os.path.join(os.path.dirname(self.run_info_dir), "latest")

    relative_symlink(self.run_info_dir, link_to_latest)

    // Time spent in a workunit, including its children.
    self.cumulative_timings = AggregatedTimings(os.path.join(self.run_info_dir,
                                                             "cumulative_timings"))

    // Time spent in a workunit, not including its children.
    self.self_timings = AggregatedTimings(os.path.join(self.run_info_dir, "self_timings"))

    // Hit/miss stats for the artifact cache.
    self.artifact_cache_stats = ArtifactCacheStats(os.path.join(self.run_info_dir,
                                                                "artifact_cache_stats"))

    // Daemon stats.
    self.pantsd_stats = PantsDaemonStats()

    self._all_options = all_options

    return (run_id, run_uuid)

  def start(self, report, run_start_time=None):
    Start tracking this pants run using the given Report.

After Change



    self._all_options = all_options

    return (self.run_id, self.run_uuid)

  def start(self, report, run_start_time=None):
    Start tracking this pants run using the given Report.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pantsbuild/pants
Commit Name: 8fac40d5bb7b75da9ba26d7fa34e30c18b954e33
Time: 2019-10-08
Author: dwagnerhall@twitter.com
File Name: src/python/pants/goal/run_tracker.py
Class Name: RunTracker
Method Name: initialize


Project Name: uber/petastorm
Commit Name: a31ae1708b62413c94ffae9fb6aab21b37f78212
Time: 2020-03-12
Author: weichen.xu@databricks.com
File Name: petastorm/spark/spark_dataset_converter.py
Class Name:
Method Name: _cache_df_or_retrieve_cache_path


Project Name: bokeh/bokeh
Commit Name: e8f72c97302338e2e2c30a6d00d909eba077ddf4
Time: 2018-10-04
Author: bryanv@anaconda.com
File Name: bokeh/util/serialization.py
Class Name:
Method Name: make_id