Part of bzrlib.benchmarks View In Hierarchy
Known subclasses: bzrlib.benchmarks.bench_add.AddBenchmark, bzrlib.benchmarks.bench_bench.MakeKernelLikeTreeBenchmark, bzrlib.benchmarks.bench_bundle.BundleBenchmark, bzrlib.benchmarks.bench_bundle.BundleLibraryLevelInstallBenchmark, bzrlib.benchmarks.bench_bundle.BundleLibraryLevelWriteBenchmark, bzrlib.benchmarks.bench_cache_utf8.DecodingBenchmarks, bzrlib.benchmarks.bench_cache_utf8.EncodingBenchmark, bzrlib.benchmarks.bench_checkout.CheckoutBenchmark, bzrlib.benchmarks.bench_commit.CommitBenchmark, bzrlib.benchmarks.bench_dirstate.BenchmarkDirState, bzrlib.benchmarks.bench_info.InfoBenchmark, bzrlib.benchmarks.bench_inventory.InvBenchmark, bzrlib.benchmarks.bench_knit.BenchKnitIndex, bzrlib.benchmarks.bench_log.LogBenchmark, bzrlib.benchmarks.bench_osutils.WalkDirsBenchmark, bzrlib.benchmarks.bench_pack.BenchPack, bzrlib.benchmarks.bench_rocks.RocksBenchmark, bzrlib.benchmarks.bench_sftp.SFTPBenchmark, bzrlib.benchmarks.bench_startup.StartupBenchmark, bzrlib.benchmarks.bench_status.StatusBenchmark, bzrlib.benchmarks.bench_tags.TagsBencodeBenchmark, bzrlib.benchmarks.bench_transform.TransformBenchmark, bzrlib.benchmarks.bench_workingtree.WorkingTreeBenchmark, bzrlib.benchmarks.bench_xml.BenchXMLSerializer
| Method | make_kernel_like_tree | Setup a temporary tree roughly like a kernel tree. |
| Method | make_kernel_like_added_tree | Make a kernel like tree, with all files added |
| Method | make_kernel_like_committed_tree | Make a kernel like tree, with all files added and committed |
| Method | make_kernel_like_inventory | Create an inventory with the properties of a kernel-like tree |
| Method | make_many_commit_tree | Create a tree with many commits. |
| Method | make_heavily_merged_tree | Create a tree in which almost every commit is a merge. |
| Method | create_with_commits | Create a tree with many files and many commits. Every commit changes |
| Method | commit_some_revisions | Commit a specified number of revisions to some files in a tree, |
Inherited from ExternalBase:
| Method | check_output | Verify that the expected output matches what bzr says. |
Inherited from TestCaseWithTransport (via ExternalBase):
| Method | get_vfs_only_server | See TestCaseWithMemoryTransport. |
| Method | make_branch_and_tree | Create a branch on the transport and a tree locally. |
| Method | assertIsDirectory | Assert that relpath within transport is a directory. |
| Method | assertTreesEqual | Check that left and right have the same content and properties. |
| Method | setUp | Undocumented |
| Method | disable_missing_extensions_warning | Some tests expect a precise stderr content. |
Inherited from TestCaseInTempDir (via ExternalBase, TestCaseWithTransport):
| Method | check_file_contents | Undocumented |
| Method | makeAndChdirToTestDir | See TestCaseWithMemoryTransport.makeAndChdirToTestDir(). |
| Method | deleteTestDir | Undocumented |
| Method | build_tree | Build a test tree according to a pattern. |
| Method | assertInWorkingTree | Assert whether path or paths are in the WorkingTree |
| Method | assertNotInWorkingTree | Assert whether path or paths are not in the WorkingTree |
| Method | _getTestDirPrefix | Undocumented |
Inherited from TestCaseWithMemoryTransport (via ExternalBase, TestCaseWithTransport, TestCaseInTempDir):
| Method | __init__ | Undocumented |
| Method | get_transport | Return a writeable transport. |
| Method | get_readonly_transport | Return a readonly transport for the test scratch space |
| Method | create_transport_readonly_server | Create a transport server from class defined at init. |
| Method | get_readonly_server | Get the server instance for the readonly transport |
| Method | get_readonly_url | Get a URL for the readonly transport. |
| Method | get_server | Get the read/write server instance. |
| Method | get_url | Get a URL (or maybe a path) for the readwrite transport. |
| Method | get_vfs_only_url | Get a URL (or maybe a path for the plain old vfs transport. |
| Method | make_branch | Create a branch on the transport at relpath. |
| Method | make_bzrdir | Undocumented |
| Method | make_repository | Create a repository on our default transport at relpath. |
| Method | make_smart_server | Undocumented |
| Method | make_branch_and_memory_tree | Create a branch on the default transport and a MemoryTree for it. |
| Method | make_branch_builder | Undocumented |
| Method | overrideEnvironmentForTesting | Undocumented |
| Method | setup_smart_server_with_call_log | Sets up a smart server as the transport server with a call log. |
| Method | reset_smart_call_log | Undocumented |
| Method | _adjust_url | Get a URL (or maybe a path) for the readwrite transport. |
| Method | _create_safety_net | Make a fake bzr directory. |
| Method | _check_safety_net | Check that the safety .bzr directory have not been touched. |
| Method | _make_test_root | Undocumented |
Inherited from TestCase (via ExternalBase, TestCaseWithTransport, TestCaseInTempDir, TestCaseWithMemoryTransport):
| Method | debug | Undocumented |
| Method | disable_directory_isolation | Turn off directory isolation checks. |
| Method | enable_directory_isolation | Enable directory isolation checks. |
| Method | permit_dir | Permit a directory to be used by this test. See permit_url. |
| Method | permit_url | Declare that url is an ok url to use in this test. |
| Method | permit_source_tree_branch_repo | Permit the source tree bzr is running from to be opened. |
| Method | record_directory_isolation | Gather accessed directories to permit later access. |
| Method | start_server | Start transport_server for this test. |
| Method | assertEqual | Undocumented |
| Method | assertEqualDiff | Assert two texts are equal, if not raise an exception. |
| Method | assertEqualMode | Undocumented |
| Method | assertEqualStat | assert that expected and actual are the same stat result. |
| Method | assertLength | Assert that obj_with_len is of length length. |
| Method | assertLogsError | Assert that func(*args, **kwargs) quietly logs a specific exception. |
| Method | assertPositive | Assert that val is greater than 0. |
| Method | assertNegative | Assert that val is less than 0. |
| Method | assertStartsWith | Undocumented |
| Method | assertEndsWith | Asserts that s ends with suffix. |
| Method | assertContainsRe | Assert that a contains something matching a regular expression. |
| Method | assertNotContainsRe | Assert that a does not match a regular expression |
| Method | assertContainsString | Undocumented |
| Method | assertSubset | Assert that every entry in sublist is present in superlist. |
| Method | assertListRaises | Fail unless excClass is raised when the iterator from func is used. |
| Method | assertRaises | Assert that a callable raises a particular exception. |
| Method | assertIs | Undocumented |
| Method | assertIsNot | Undocumented |
| Method | assertTransportMode | Fail if a path does not have mode "mode". |
| Method | assertIsSameRealPath | Fail if path1 and path2 points to different files |
| Method | assertIsInstance | Fail if obj is not an instance of kls |
| Method | assertFileEqual | Fail if path does not contain 'content'. |
| Method | assertDocstring | Fail if obj does not have expected_docstring |
| Method | failUnlessExists | Fail unless path or paths, which may be abs or relative, exist. |
| Method | failIfExists | Fail if path or paths, which may be abs or relative, exist. |
| Method | applyDeprecated | Call a deprecated callable without warning the user. |
| Method | callCatchWarnings | Call a callable that raises python warnings. |
| Method | callDeprecated | Assert that a callable is deprecated in a particular way. |
| Method | thisFailsStrictLockCheck | It is known that this test would fail with -Dstrict_locks. |
| Method | addCleanup | Arrange to run a callable when this case is torn down. |
| Method | overrideAttr | Overrides an object attribute restoring it after the test. |
| Method | knownFailure | This test has failed for some known reason. |
| Method | time | Run callable and accrue the time it takes to the benchmark time. |
| Method | log | Undocumented |
| Method | get_log | Get a unicode string containing the log from bzrlib.trace. |
| Method | requireFeature | This test requires a specific feature is available. |
| Method | run_bzr | Invoke bzr, as if it were run from the command line. |
| Method | run_bzr_error | Run bzr, and check that stderr contains the supplied regexes |
| Method | run_bzr_subprocess | Run bzr in a subprocess for testing. |
| Method | start_bzr_subprocess | Start bzr in a subprocess for testing. |
| Method | get_source_path | Return the path of the directory containing bzrlib. |
| Method | get_bzr_path | Return the path of the 'bzr' executable for this test suite. |
| Method | finish_bzr_subprocess | Finish the execution of process. |
| Method | check_inventory_shape | Compare an inventory to a list of expected names. |
| Method | apply_redirected | Call callable with redirected std io pipes. |
| Method | reduceLockdirTimeout | Reduce the default lock timeout for the duration of the test, so that |
| Method | make_utf8_encoded_stringio | Return a StringIOWrapper instance, that will encode Unicode |
| Method | disable_verb | Disable a smart server verb for one test. |
| Method | _check_leaked_threads | Undocumented |
| Method | _clear_debug_flags | Prevent externally set debug flags affecting tests. |
| Method | _clear_hooks | Undocumented |
| Method | _silenceUI | Turn off UI for duration of test |
| Method | _check_locks | Check that all lock take/release actions have been paired. |
| Method | _track_locks | Track lock activity during tests. |
| Method | _lock_acquired | Undocumented |
| Method | _lock_released | Undocumented |
| Method | _lock_broken | Undocumented |
| Method | _preopen_isolate_transport | Check that all transport openings are done in the test work area. |
| Method | _preopen_isolate_url | Undocumented |
| Method | _track_transports | Install checks for transport usage. |
| Method | _ndiff_strings | Return ndiff between two strings containing lines. |
| Method | _capture_deprecation_warnings | A helper for callDeprecated and applyDeprecated. |
| Method | _startLogFile | Send bzr and test log messages to a temporary file. |
| Method | _finishLogFile | Finished with the log file. |
| Method | _cleanEnvironment | Undocumented |
| Method | _captureVar | Set an environment variable, and reset it when finished. |
| Method | _restoreEnvironment | Undocumented |
| Method | _restoreHooks | Undocumented |
| Method | _do_skip | Undocumented |
| Static Method | _do_known_failure | Undocumented |
| Static Method | _do_not_applicable | Undocumented |
| Static Method | _do_unsupported_or_skip | Undocumented |
| Method | _get_log | Internal helper to get the log from bzrlib.trace for this test. |
| Method | _run_bzr_autosplit | Run bazaar command line, splitting up a string command line. |
| Method | _run_bzr_core | Undocumented |
| Method | _popen | Place a call to Popen. |
| Parameters | url | Creat the kernel like tree as a lightweight checkout of a new branch created at url. |
| root | Path where the tree will be created. | |
| link_working | instead of creating a new copy of all files just hardlink the working tree. Tests must request this, because they must break links if they want to change the files | |
| Returns | A newly created tree. | |
| Parameters | root | Where to create the files |
| link_working | Instead of copying all of the working tree files, just hardlink them to the cached files. Tests can unlink files that they will change. | |
| hot_cache | Run through the newly created tree and make sure the stat-cache is correct. The old way of creating a freshly added tree always had a hot cache. |
| Parameters | root | Where to create the files |
| link_working | Instead of copying all of the working tree files, just hardlink them to the cached files. Tests can unlink files that they will change. | |
| link_bzr | Hardlink the .bzr directory. For readonly operations this is safe, and shaves off a lot of setup time |
This should be equivalent to a committed kernel like tree, not just a working tree.
No file changes are included. Not hardlinking the working tree, because there are no working tree files.
No file changes are included. This produces two trees, one of which is returned. Except for the first commit, every commit in its revision-history is a merge another commit in the other tree. Not hardlinking the working tree, because there are no working tree files.
| Parameters | num_files | number of files to be created |
| num_commits | number of commits in the newly created tree |
| Parameters | tree | The tree in which the changes happen. |
| files | The list of files where changes should occur. | |
| num_commits | The number of commits | |
| changes_per_commit | The number of files that are touched in each commit. |