MCPcopy
hub / github.com/gitless-vcs/gitless / assert_status_performance

Method assert_status_performance

gitless/tests/test_e2e.py:698–713  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

696
697 def test_status_performance(self):
698 def assert_status_performance():
699 # The test fails if `gl status` takes more than 100 times
700 # the time `git status` took.
701 MAX_TOLERANCE = 100
702
703 t = time.time()
704 gl.status()
705 gl_t = time.time() - t
706
707 t = time.time()
708 git.status()
709 git_t = time.time() - t
710
711 self.assertTrue(
712 gl_t < git_t*MAX_TOLERANCE,
713 msg='gl_t {0}, git_t {1}'.format(gl_t, git_t))
714
715 # All files are untracked
716 assert_status_performance()

Callers

nothing calls this directly

Calls 1

statusMethod · 0.80

Tested by

no test coverage detected