aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/profiler
Commit message (Collapse)AuthorAge
* Add new class to create cpu usage time series.Gravatar twerth2018-08-13
| | | | | RELNOTES: None PiperOrigin-RevId: 208462186
* Automated rollback of commit 7e87730de985b7099b9b683571d58efdaab70890.Gravatar ccalvarin2018-07-27
| | | | | | | | | | | | | | | | | *** Reason for rollback *** Go back to the default constructor - instead of requiring everywhere to know the correct hash function, we'll have the default rely on global state. It will make transition easier, even if it makes the origin of the hash less obvious. *** Original change description *** Remove default MD5 in most of Bazel's virtual filesystems. This forces the ex-default to be explicit in a lot of tests, but I'd rather that than have the risk of implicit md5-use in production code. To keep this CL smaller, do not remove the default from UnixFS quite yet. RELNOTES: None. PiperOrigin-RevId: 206358838
* Add an option to compress the JSON trace profile.Gravatar twerth2018-07-27
| | | | | | | chrome://tracing is able to load gzipped profiles out of the box. RELNOTES: None PiperOrigin-RevId: 206308018
* Remove default MD5 in most of Bazel's virtual filesystems.Gravatar ccalvarin2018-07-26
| | | | | | | | | This forces the ex-default to be explicit in a lot of tests, but I'd rather that than have the risk of implicit md5-use in production code. To keep this CL smaller, do not remove the default from UnixFS quite yet. RELNOTES: None. PiperOrigin-RevId: 206223521
* Bazel server, tools: ensure Writers are closedGravatar laszlocsomor2018-07-10
| | | | | | | | | | | | | | | | | | | | Follow-up to commit 09d20311d982606093ed881d779bb05a5ee70ed3. Use try-with-resources to ensure Writer objects are closed eagerly. Eagerly closing Writers avoids hanging on to file handles until the garbage collector finalizes the object, meaning Bazel on Windows (and other processes) can delete or mutate these files. Hopefully this avoids intermittent file deletion errors that sometimes occur on Windows. See https://github.com/bazelbuild/bazel/issues/5512 RELNOTES: none PiperOrigin-RevId: 203934471
* Add support for the Json trace file formatGravatar ulfjack2018-06-12
| | | | | | | | | | | | | | | | | Add a --experimental_generate_json_trace_profile option that puts a file into the output base (or uses --profile if set). There are still a lot of problems with this. - unexplained holes - way too many threads - nonsensical event titles - too many detail events, too little overview - it may also cause unnecessary load - it silently overwrites the existing file on subsequent invocations The format is documented here: goo.gl/oMZPLh PiperOrigin-RevId: 200259431
* Refactor profilerGravatar ulfjack2018-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | - move the save method to an inner class - don't use a timer, use a blocking queue instead - add a format enum (in anticipation of adding a json output format) - update the test to use an in memory buffer, and avoid FoundationTestCase Compared to the original https://github.com/bazelbuild/bazel/commit/15b8c259db111012b4642287172cb4d1d82151f3, it contains these changes: - Make it so we don't create a queue if we are not going to write any data! The queue is now owned by the writer, and if there is no writer, there is no queue. This was causing a memory regression because slowest task profiling is enabled by default, in which case the profiler is started with no output file. In that case, there's no thread that is emptying the queue, but the queue was still created by default. - add additional tests for slowest task and histogram handling; these also provide coverage for the case where the profiler is started without an output stream - move all the writer thread handling into the inner class - make writer access thread-safe - add a bunch of documentation PiperOrigin-RevId: 200212978
* Automated rollback of commit 15b8c259db111012b4642287172cb4d1d82151f3.Gravatar jmmv2018-06-11
| | | | | | | | *** Reason for rollback *** Breaks internal performance tests. PiperOrigin-RevId: 200103033
* Refactor profilerGravatar ulfjack2018-06-11
| | | | | | | | | - move the save method to an inner class - don't use a timer, use a blocking queue instead - add a format enum (in anticipation of adding a json output format) - update the test to use an in memory buffer, and avoid FoundationTestCase PiperOrigin-RevId: 200065404
* Add AutoProfiler-like API to ProfilerGravatar ulfjack2018-06-11
| | | | | | - migrate all startTask/completeTask pairs to the new API PiperOrigin-RevId: 200038703
* Clean up Profiler a bitGravatar ulfjack2018-06-08
| | | | PiperOrigin-RevId: 199849102
* Harden Profiler slow tasks capping testGravatar michajlo2018-05-02
| | | | | | | | | | | Internally slow task aggregators are sharded by thread id, so we need to throw some threads at it to get an interesting test case, otherwise everything comes from one thread and lands in one shard and the shard combination logic isn't exercised. Of course it's possible that all the threads created in the test wind up landing in the same shard, let's just pretend that's not going to happen, since the odds are pretty low. PiperOrigin-RevId: 195141874
* Fix profiler slow task limitingGravatar michajlo2018-04-24
| | | | | | | | Looks like a typo resulted in getSlowestTasks accumulating way more than it should have and we were missing the test coverage to catch it. RELNOTES: None PiperOrigin-RevId: 194169355
* Change profiling to only accept strings for its "description" argument. ↵Gravatar janakr2018-04-01
| | | | | | Profiling can hold onto objects for the duration of the build, and some of those objects may be temporary that should not be persisted. In particular, UnixGlob and its inner classes should not outlive loading and analysis. For the most part, care was taken in this CL to only use strings that required no additional construction, mainly to minimize garbage (retaining references to newly created strings is not as great a concern since only the strings corresponding to the slowest K tasks are retained, for some relatively small values of K). Action descriptions for actually executing actions are eagerly expanded because that work is minimal compared to the work of actually executing an action. PiperOrigin-RevId: 191251488
* Add functionality to MemoryProfiler to do multiple garbage collections at ↵Gravatar janakr2018-02-28
| | | | | | the end of the build in an effort to get an accurate measurement of used memory. PiperOrigin-RevId: 187337487
* windows,tests: enable some tests on WindowsGravatar Laszlo Csomor2018-01-15
| | | | | | | | | | | | Add ":windows_tests" and ":all_windows_tests" rules to these packages, and include them in the parent packages. Fixes https://github.com/bazelbuild/bazel/issues/4127 See https://github.com/bazelbuild/bazel/issues/4292 Change-Id: I9c454ed21f47feb8e88e1c25b1e4fa216baa38f6 PiperOrigin-RevId: 181951525
* Add memory profiler.Gravatar tomlu2017-10-18
| | | | | | | | | | | This adds two dump command, bazel dump --rules and bazel dump --skylark_memory. dump --rules outputs a summary of the count, action count, and memory consumption of each rule and aspect class. dump --skylark_memory outputs a pprof-compatible file with all Skylark analysis allocations. Users can then use pprof as per normal to analyse their builds. RELNOTES: Add memory profiler. PiperOrigin-RevId: 172558600
* Add callcount system for blaze developers.Gravatar tomlu2017-10-16
| | | | | | | | | | | This simple system allows blaze developers to insert instrumentations in particular methods that they want to know: 1. How often are they called? 2. From which call sites are they called, with full call stack The output is a pprof file that can then be analysed offline. PiperOrigin-RevId: 172128440
* Add files that were droped by our export processGravatar dmarting2017-09-19
| | | | | | | | | Those files are not linked anywhere and where removed by the export process either by accident or for better support from IntelliJ. According to ij.bazel.build a non linked target will not be analyzed so it should be safe. PiperOrigin-RevId: 169229654
* Fix #3102 HtmlChart is uncoloredGravatar Andreas Hippler2017-09-12
| | | | | | Closes #3697. PiperOrigin-RevId: 168353082
* More BUILD file refactorings.Gravatar philwo2017-09-06
| | | | | | | | | Split collect, concurrent, vfs, windows into package-level BUILD files. Move clock classes out of "util", into their own Java package. Move CompactHashSet into its own Java package to break a dependency cycle. Give nestedset and inmemoryfs their own package-level BUILD files. PiperOrigin-RevId: 167702127
* Split the cycle between vfs and profiler.Gravatar philwo2017-08-31
| | | | | | | | | | - Move ProfilerInfo into a subpackage (it's not necessary for profiling, just for analyzing a profile). - Make some fields in Profiler public for ProfileInfo. - Mark Profiler as ThreadSafe; there's no cyclic dependency here. This is based on ulfjack's microbazel patch series: https://github.com/ulfjack/bazel/commit/44553fcac0fc876784d8f48c2e577d8c999712de PiperOrigin-RevId: 167121952
* ProfilerTest: Removes flakiness from ProfilerTestGravatar plf2017-07-11
| | | | | | | | The test now uses a fake clock and replaces calls to Thread.sleep() by manual changes to the clock. RELNOTES:none PiperOrigin-RevId: 161520781
* Migrate tests to Truth.Gravatar lberki2017-05-29
| | | | | | RELNOTES: None. PiperOrigin-RevId: 157378037
* Fixes incorrectly-ordered arguments to calls to assertEqualsGravatar Googler2017-05-19
| | | | | | | | | | | | | | | [] This change has been automatically generated by an Error Prone check that detects incorrect argument ordering on calls to assertEquals-style methods. See [] Cleanup change automatically generated by javacflume/refactory Refactoring: third_party/java_src/error_prone/project/core/src/main/java/com/google/errorprone/bugpatterns/argumentselectiondefects:AssertEqualsArgumentOrderChecker_refactoring Tested: TAP --sample for global presubmit queue [] PiperOrigin-RevId: 156539781
* Open-sourced tests from lib/profiler.Gravatar Florian Weikert2015-12-07
-- MOS_MIGRATED_REVID=109577273