Skip to content

Commit

Permalink
make cols an arg
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Nov 8, 2024
1 parent fe4d7ea commit b53945d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions stdlib/Profile/src/Profile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ const META_OFFSET_THREADID = 5

"""
print([io::IO = stdout,] [data::Vector = fetch()], [lidict::Union{LineInfoDict, LineInfoFlatDict} = getdict(data)]; kwargs...)
print(path::String [data::Vector = fetch()], [lidict::Union{LineInfoDict, LineInfoFlatDict} = getdict(data)]; kwargs...)
print(path::String, [cols::Int = 1000], [data::Vector = fetch()], [lidict::Union{LineInfoDict, LineInfoFlatDict} = getdict(data)]; kwargs...)
Prints profiling results to `io` (by default, `stdout`). If you do not
supply a `data` vector, the internal buffer of accumulated backtraces
Expand Down Expand Up @@ -358,9 +358,9 @@ function print(io::IO,
return
end

function print(path::String, args...; kwargs...)
function print(path::String, cols::Int = 1000, args...; kwargs...)
open(path, "w") do io
ioc = IOContext(io, :displaysize=>(100000,100000))
ioc = IOContext(io, :displaysize=>(1000,cols))
print(ioc, args...; kwargs...)
end
end
Expand Down

0 comments on commit b53945d

Please sign in to comment.