File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,8 @@ def __init__(self, filter=None):
134134
135135 def _show (self , tree ):
136136 for (filename , funline , funname ), line_stats in self .lines_stat (tree ):
137- if self .filter is None or funname .find (self .filter ) != - 1 :
137+ if self .filter is None or self .filter in funname or \
138+ self .filter in filename :
138139 self .show_func (filename , funline , funname , line_stats )
139140
140141 def lines_stat (self , tree ):
@@ -248,7 +249,10 @@ def main():
248249 parser .add_argument ('--lines' , dest = 'lines' , action = 'store_true' )
249250 parser .set_defaults (lines = False )
250251
251- parser .add_argument ('--filter' , dest = 'filter' , type = str , default = None )
252+ parser .add_argument ('--filter' , dest = 'filter' , type = str ,
253+ default = None , help = "Filters the console output when "
254+ "vmprofshow is invoked with --lines. Filters by "
255+ "function names or filenames." )
252256
253257 args = parser .parse_args ()
254258
You can’t perform that action at this time.
0 commit comments