olexandr-konovalov / LocalNRconstruction

Construction of local near-rings
0 stars 0 forks source link

Profiling #4

Open olexandr-konovalov opened 4 years ago

olexandr-konovalov commented 4 years ago

See instructions in https://gap-packages.github.io/profiling/doc/chap1.html

To perform profiling, call for example

ProfileLineByLine("output.gz");Read("End125_5base.g");UnprofileLineByLine();

You should write this all on a single line in GAP, as profiling records the real time spent executing code, so time spent typing commands will be counted.

This creates a file called output.gz, which stores the result of running the code.

Then call

LoadPackage("profiling"); 
OutputAnnotatedCodeCoverageFiles("output.gz", "outdir");

To read output.gz and produce HTML output into the directory outdir. You must view the result of your profiling in a web-browser outside of GAP. Open index.html from the outdir directory in the web browser of your choice to see what happened.

olexandr-konovalov commented 4 years ago

I am now running profiling... The whole run tales too much time but I am waiting... Still, that's quite a large code to profile in one go. One could have a simpler problem, maybe for a smaller instance of the problem, or maybe by dropping some iterations where the work done is the same. Having functions that are callable will certainly ease setting up profiling - we can then profile calls of individual functions.

We should really do things in order:

olexandr-konovalov commented 4 years ago

Update: created output.gz almost 5 GB size. OutputAnnotatedCodeCoverageFiles("output.gz", "outdir"); takes a while (1238 seconds). We need certainly either a smaller problem or more targeted profiling of individual steps, since we can't wait that much for each run of the modified code.

olexandr-konovalov commented 4 years ago

Posting here the output of OutputAnnotatedCodeCoverageFiles:

outdir.tar.gz

Open index.html from the outdir directory in the web browser of your choice to see what happened.