Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
53b809d6
Kaydet (Commit)
53b809d6
authored
Nis 26, 2001
tarafından
Eric S. Raymond
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added more help, and recovery from misspelled sort key arguments.
üst
c1218bc0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
pstats.py
Lib/pstats.py
+19
-2
No files found.
Lib/pstats.py
Dosyayı görüntüle @
53b809d6
...
...
@@ -568,22 +568,31 @@ if __name__ == '__main__':
else
:
print
"No statistics object is loaded."
return
0
def
generic_help
(
self
):
print
"Arguments may be:"
print
"* An integer maximum number of entries to print."
print
"* A decimal fractional number between 0 and 1, controlling"
print
" what fraction of selected entries to print."
print
"* A regular expression; only entries with function names"
print
" that match it are printed."
def
do_add
(
self
,
line
):
self
.
stats
.
add
(
line
)
return
0
def
help_add
(
self
):
print
"Add profile info from given file to current stastics object."
print
"Add profile info from given file to current sta
ti
stics object."
def
do_callees
(
self
,
line
):
return
self
.
generic
(
'print_callees'
,
line
)
def
help_callees
(
self
):
print
"Print callees statistics from the current stat object."
self
.
generic_help
()
def
do_callers
(
self
,
line
):
return
self
.
generic
(
'print_callers'
,
line
)
def
help_callers
(
self
):
print
"Print callers statistics from the current stat object."
self
.
generic_help
()
def
do_EOF
(
self
,
line
):
print
""
...
...
@@ -619,15 +628,23 @@ if __name__ == '__main__':
print
"Reverse the sort order of the profiling report."
def
do_sort
(
self
,
line
):
apply
(
self
.
stats
.
sort_stats
,
line
.
split
())
abbrevs
=
self
.
stats
.
get_sort_arg_defs
()
.
keys
()
if
line
and
not
filter
(
lambda
x
,
a
=
abbrevs
:
x
not
in
a
,
line
.
split
()):
apply
(
self
.
stats
.
sort_stats
,
line
.
split
())
else
:
print
"Valid sort keys (unique prefixes are accepted):"
for
(
key
,
value
)
in
Stats
.
sort_arg_dict_default
.
items
():
print
"
%
s --
%
s"
%
(
key
,
value
[
1
])
return
0
def
help_sort
(
self
):
print
"Sort profile data according to specified keys."
print
"(Typing `sort' without arguments lists valid keys.)"
def
do_stats
(
self
,
line
):
return
self
.
generic
(
'print_stats'
,
line
)
def
help_stats
(
self
):
print
"Print statistics from the current stat object."
self
.
generic_help
()
def
do_strip
(
self
,
line
):
self
.
stats
.
strip_dirs
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment