Skip to content

Commit 30d4209

Browse files
author
Matthias Koeppe
committed
sage.misc.timing: Split out from sage.misc.misc
1 parent 3230f00 commit 30d4209

File tree

29 files changed

+280
-248
lines changed

29 files changed

+280
-248
lines changed

pkgs/sagemath-objects/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ graft sage/libs/gmp
8383

8484
## FIXME: Needed for doctesting
8585
include sage/misc/misc.* # walltime, cputime used in sage.doctest
86+
include sage/misc/timing.p*
8687

8788

8889
global-exclude *.c

src/sage/coding/binary_code.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ from cpython.object cimport PyObject_RichCompare
4747
from cysignals.memory cimport sig_malloc, sig_realloc, sig_free
4848

4949
from sage.structure.element import is_Matrix
50-
from sage.misc.misc import cputime
50+
from sage.misc.timing import cputime
5151
from sage.rings.integer cimport Integer
5252
from copy import copy
5353
from sage.data_structures.bitset_base cimport *

src/sage/databases/cremona.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
import sage.schemes.elliptic_curves.constructor as elliptic
5252
from .sql_db import SQLDatabase, verify_column
5353
from sage.features.databases import DatabaseCremona
54-
from sage.misc.misc import walltime
54+
from sage.misc.timing import walltime
5555

5656
import re
5757
import string

src/sage/doctest/forker.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
import IPython.lib.pretty
5555

5656
import sage.misc.randstate as randstate
57-
from sage.misc.misc import walltime
57+
from sage.misc.timing import walltime
5858
from .util import Timer, RecordingDict, count_noun
5959
from .sources import DictAsObject
6060
from .parsing import OriginalSource, reduce_hex, unparse_optional_tags
@@ -1275,7 +1275,7 @@ def report_success(self, out, test, example, got, *, check_duration=0):
12751275
sage: from sage.doctest.forker import SageDocTestRunner
12761276
sage: from sage.doctest.sources import FileDocTestSource
12771277
sage: from sage.doctest.control import DocTestDefaults; DD = DocTestDefaults()
1278-
sage: from sage.misc.misc import walltime
1278+
sage: from sage.misc.timing import walltime
12791279
sage: from sage.env import SAGE_SRC
12801280
sage: import doctest, sys, os
12811281
sage: DTR = SageDocTestRunner(SageOutputChecker(), verbose=True, sage_options=DD, optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS)
@@ -1449,7 +1449,7 @@ def report_overtime(self, out, test, example, got, *, check_duration=0):
14491449
sage: from sage.doctest.forker import SageDocTestRunner
14501450
sage: from sage.doctest.sources import FileDocTestSource
14511451
sage: from sage.doctest.control import DocTestDefaults; DD = DocTestDefaults()
1452-
sage: from sage.misc.misc import walltime
1452+
sage: from sage.misc.timing import walltime
14531453
sage: from sage.env import SAGE_SRC
14541454
sage: import doctest, sys, os
14551455
sage: DTR = SageDocTestRunner(SageOutputChecker(), verbose=True, sage_options=DD, optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS)

src/sage/doctest/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# https://www.gnu.org/licenses/
2020
# ****************************************************************************
2121

22-
from sage.misc.misc import walltime, cputime
22+
from sage.misc.timing import walltime, cputime
2323

2424

2525
def count_noun(number, noun, plural=None, pad_number=False, pad_noun=False):

src/sage/geometry/fan.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@
253253
from sage.graphs.digraph import DiGraph
254254
from sage.matrix.constructor import matrix
255255
from sage.misc.cachefunc import cached_method
256-
from sage.misc.misc import walltime
256+
from sage.misc.timing import walltime
257257
from sage.misc.misc_c import prod
258258
from sage.modules.free_module import span
259259
from sage.modules.free_module_element import vector

src/sage/geometry/fan_morphism.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,7 @@ def _subdivide_domain_fan(self, check, verbose):
677677
domain_fan = self._domain_fan
678678
lattice_dim = self.domain().dimension()
679679
if verbose:
680+
from sage.misc.timing import walltime
680681
start = walltime()
681682
print("Placing ray images", end=" ")
682683
# Figure out where 1-dimensional cones (i.e. rays) are mapped.

src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,6 +1063,7 @@ def random_tests(num=50, n_max=50, k_max=6, nwords_max=200, perms_per_code=10, d
10631063
sage: sage.groups.perm_gps.partn_ref.refinement_binary.random_tests() # long time (up to 5s on sage.math, 2012)
10641064
All passed: ... random tests on ... codes.
10651065
"""
1066+
from sage.misc.timing import walltime
10661067
from sage.misc.prandom import random, randint
10671068
from sage.combinat.permutation import Permutations
10681069
from sage.matrix.constructor import random_matrix, matrix

src/sage/groups/perm_gps/partn_ref/refinement_matrices.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ def random_tests(n=10, nrows_max=50, ncols_max=50, nsymbols_max=10, perms_per_ma
331331
sage: sage.groups.perm_gps.partn_ref.refinement_matrices.random_tests() # long time (up to 30s on sage.math, 2011)
332332
All passed: ... random tests on ... matrices.
333333
"""
334+
from sage.misc.timing import walltime
334335
from sage.misc.prandom import random, randint
335336
from sage.combinat.permutation import Permutations
336337
from sage.matrix.constructor import random_matrix, matrix

src/sage/interfaces/tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"""
4444

4545
from .all import *
46-
from sage.misc.misc import cputime, walltime
46+
from sage.misc.timing import cputime, walltime
4747
import sys
4848

4949
def manyvars(s, num=70000, inlen=1, step=2000):

0 commit comments

Comments
 (0)