7c3f95d1505944f54c998f27f144d4dcb8968477,src/python/twitter/pants/tasks/benchmark_run.py,BenchmarkRun,__init__,#BenchmarkRun#Any#,39

Before Change


    self.profile = context.config.get("benchmark-run", "profile",
                                      default="benchmark-caliper-0.5")
    self.confs = context.config.getlist("benchmark-run", "confs")
    self.java_args = context.config.getlist("benchmark-run", "args",
                                            default=["-Xmx1g", "-XX:MaxPermSize=256m"])
    self.agent_profile = context.config.get("benchmark-run", "agent_profile",
                                            default="benchmark-java-allocation-instrumenter-2.1")
    // TODO(Steve Gury):
    // Find all the target classes from the Benchmark target itself
    // https://jira.twitter.biz/browse/AWESOME-1938
    self.caliper_args = context.options.target_class

    if context.options.memory_profiling:
      self.caliper_args += ["--measureMemory"]
      // For rewriting JDK classes to work, the JAR file has to be listed specifically in
      // the JAR manifest as something that goes in the bootclasspath.
      // The MANIFEST list a jar "allocation.jar" this is why we have to rename it
      agent_jar = os.readlink(profile_classpath(self.agent_profile)[0])
      allocation_jar = os.path.join(os.path.dirname(agent_jar), "allocation.jar")
      // TODO(Steve Gury): Find a solution to avoid copying the jar every run and being resilient
      // to version upgrade
      shutil.copyfile(agent_jar, allocation_jar)
      os.environ["ALLOCATION_JAR"] = str(allocation_jar)

After Change


                                                     default=[":benchmark-caliper-0.5"])
    self._agent_bootstrap_tools = config.getlist("benchmark-run",
                                                 "agent_profile",
                                                 default=[":benchmark-java-allocation-instrumenter-2.1"])

    self._bootstrap_utils.register_all([self._benchmark_bootstrap_tools,
                                        self._agent_bootstrap_tools])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: pantsbuild/pants
Commit Name: 7c3f95d1505944f54c998f27f144d4dcb8968477
Time: 2013-11-25
Author: benjy@foursquare.com
File Name: src/python/twitter/pants/tasks/benchmark_run.py
Class Name: BenchmarkRun
Method Name: __init__


Project Name: pantsbuild/pants
Commit Name: 7c3f95d1505944f54c998f27f144d4dcb8968477
Time: 2013-11-25
Author: benjy@foursquare.com
File Name: src/python/twitter/pants/tasks/benchmark_run.py
Class Name: BenchmarkRun
Method Name: __init__


Project Name: pantsbuild/pants
Commit Name: 0ae83e5eea0c5df1423be7c34db26c203d5f51de
Time: 2013-11-07
Author: pl@foursquare.com
File Name: src/python/twitter/pants/tasks/benchmark_run.py
Class Name: BenchmarkRun
Method Name: __init__


Project Name: pantsbuild/pants
Commit Name: 4ea61b08fa4e415f012b3c4576a2f99c2be39de6
Time: 2014-01-30
Author: benjy@foursquare.com
File Name: src/python/twitter/pants/tasks/nailgun_task.py
Class Name: NailgunTask
Method Name: __init__