@timed to plot the time and memory consumption

Hey Amrusama! Welcome!

You can find this thread useful for getting the time How to save @time output in a file or variable? I’ll try to find something for the memory consumption. Maybe some hack over @time??

UPDATE: I guess that the second value of @timed is for the time and the third is for the memory. Since the first is for the result, you can collect all three in a row. NOT working example, this is only to explain myself,

julia> for i in 1:100
           rows[i] = (@timed i^2)[1:3]
       end

julia> plot(1:100, [rows[i][1] for i in 1:100]) # for the result of ^2

julia> plot(1:100, [rows[i][2] for i in 1:100]) # for the timing

julia> plot(1:100, [rows[i][3] for i in 1:100]) # for the memory

I guess that there are better options to do this.