[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Experimental support for HTML-export of profiler data

From: Daniel Kraft
Subject: Experimental support for HTML-export of profiler data
Date: Sun, 08 Nov 2015 14:10:31 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0

Hi all!

As discussed with some members of the community in Darmstadt, I've been
working on a function that exports profiler data as a set of HTML files.

A first experimental version is attached.  To use it, do something like:

> profexport ("foo")
> profexport ("foo", "Some name")
> profexport ("foo", info-structure)

(See the help text for more details.)

This writes out a set of HTML files to the directory "foo".  There are
three "types" of files written:

1) index.html corresponds to the flat profile shown by "profshow" and is
intended as the starting point.

2) The files func-*.html contain information for all of the individual
functions and are accessible by clicking on the function names in the
flat profile.  This data is not directly accessible with the existing
profiler functions, and is basically what the info.FunctionTable contains.

3) The hierarchical profile is present in hierarchy-*.html, starting
with hierarchy-1.html as the top level.  This corresponds to what
"profexplore" shows.

Note that there is not yet any styling, and I'm also not sure about the
best way to link the files to each other; the current HTML templates are
only an initial suggestion.  Feedback is very welcome!

What do you think about this function, is (something like it) a good
addition to Octave's profiling functions?

There are also a few more questions I would appreciate input on:

1) Currently, there are no attempts to escape strings before writing out
as HTML (this is remarked as FIXME comments in the code).  Is there
already a general-purpose HTML-escape routine somewhere?  I'm not the
first to output HTML (package documentation, for instance).  Or should I
write the routine myself, it is probably straight-forward; a few strrep
calls for the characters <>"&' should suffice.

2) There's not yet any testing; I'm not sure how far the functionality
can be tested at all, but we could at least test creation of the output
directory and input parsing.  The same goes for demo.  Would it be ok to
create and possibly not delete a temporary directory with the profiling
stuff for the demo?

3) I've also got a few ideas for improving the information that the
profiler shows in general (based on the same raw data, but with more
analysis).  I'll work on that as a follow-up.


OpenPGP: 1142 850E 6DFF 65BA 63D6  88A8 B249 2AC4 A733 0737
Namecoin: id/domob -> https://nameid.org/?name=domob
Done:  Arc-Bar-Cav-Hea-Kni-Ran-Rog-Sam-Tou-Val-Wiz
To go: Mon-Pri

Attachment: profexport.m
Description: Text Data

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]