HTML export of profiler data

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

HTML export of profiler data

Daniel Kraft
Hi all!

I've been quite busy over the last couple of weeks, but I would like to
push forward with HTML export of profiler data now (see [1]).  In
addition to the patch as posted, I have some ideas for further extending
the HTML output -- but I suggest to merge the basic functionality first.

  [1]
https://lists.gnu.org/archive/html/octave-maintainers/2015-11/msg00052.html

I like the suggested CSS addition by ederag.  However, I'm not sure if
styling should go directly into the HTML template.  Another idea,
borrowed from how Gnucash does HTML reports, is the following:

We could create a standalone CSS file that contains our rules (might be
more in the future, or we might also add JS files to enhance the report
even more).  This file could be installed in a /usr/share location, and
then referenced (at this location) from the generated HTML files.  This
seems like a cleaner way, although it means that HTML files may not be
portable to other machines -- not sure if that should be a design goal
or not.

What do you think, does that sound like a good idea?  Or should we
include all relevant styling (and in the future possibly scripting) in
the HTML template itself in the .m file?

Yours,
Daniel

--
http://www.domob.eu/
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


signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: HTML export of profiler data

jbect
Le 24/02/2016 19:24, Daniel Kraft a écrit :

> I've been quite busy over the last couple of weeks, but I would like to
> push forward with HTML export of profiler data now (see [1]).  In
> addition to the patch as posted, I have some ideas for further extending
> the HTML output -- but I suggest to merge the basic functionality first.
>
>    [1]
> https://lists.gnu.org/archive/html/octave-maintainers/2015-11/msg00052.html
>
> I like the suggested CSS addition by ederag.  However, I'm not sure if
> styling should go directly into the HTML template.  Another idea,
> borrowed from how Gnucash does HTML reports, is the following:
>
> We could create a standalone CSS file that contains our rules (might be
> more in the future, or we might also add JS files to enhance the report
> even more).  This file could be installed in a /usr/share location, and
> then referenced (at this location) from the generated HTML files.  This
> seems like a cleaner way, although it means that HTML files may not be
> portable to other machines -- not sure if that should be a design goal
> or not.
>
> What do you think, does that sound like a good idea?  Or should we
> include all relevant styling (and in the future possibly scripting) in
> the HTML template itself in the .m file?

In my opinion, the approach with a separate CSS file is cleaner. And it
is more efficient if you think of a complicated report made of several
HTML pages (which can share the same CSS file).

But being able to export a "portable" profiling summary, that can be
read by someone with a different version of Octave installed (or with no
Octave at all), would be a very nice additional feature.

You could get both by :

a) going for the "separate CSS file" approach,

b) but copying the CSS file(s) from /usr/share/... to the directory
containing the report.

Just my two cents.

@++
Julien

Reply | Threaded
Open this post in threaded view
|

Re: HTML export of profiler data

Daniel Kraft
Hi Julien!

On 2016-02-25 09:07, Julien Bect wrote:

> Le 24/02/2016 19:24, Daniel Kraft a écrit :
>> We could create a standalone CSS file that contains our rules (might be
>> more in the future, or we might also add JS files to enhance the report
>> even more).  This file could be installed in a /usr/share location, and
>> then referenced (at this location) from the generated HTML files.  This
>> seems like a cleaner way, although it means that HTML files may not be
>> portable to other machines -- not sure if that should be a design goal
>> or not.
> In my opinion, the approach with a separate CSS file is cleaner. And it
> is more efficient if you think of a complicated report made of several
> HTML pages (which can share the same CSS file).
>
> But being able to export a "portable" profiling summary, that can be
> read by someone with a different version of Octave installed (or with no
> Octave at all), would be a very nice additional feature.
Yes, I agree on both points.

> a) going for the "separate CSS file" approach,
>
> b) but copying the CSS file(s) from /usr/share/... to the directory
> containing the report.

This seems like a good idea.  I will try it out unless others have
objections to this plan.

Yours,
Daniel

--
http://www.domob.eu/
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


signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: HTML export of profiler data

John W. Eaton
Administrator
On 02/25/2016 01:18 PM, Daniel Kraft wrote:

> Hi Julien!
>
> On 2016-02-25 09:07, Julien Bect wrote:
>> Le 24/02/2016 19:24, Daniel Kraft a écrit :
>>> We could create a standalone CSS file that contains our rules (might be
>>> more in the future, or we might also add JS files to enhance the report
>>> even more).  This file could be installed in a /usr/share location, and
>>> then referenced (at this location) from the generated HTML files.  This
>>> seems like a cleaner way, although it means that HTML files may not be
>>> portable to other machines -- not sure if that should be a design goal
>>> or not.
>> In my opinion, the approach with a separate CSS file is cleaner. And it
>> is more efficient if you think of a complicated report made of several
>> HTML pages (which can share the same CSS file).
>>
>> But being able to export a "portable" profiling summary, that can be
>> read by someone with a different version of Octave installed (or with no
>> Octave at all), would be a very nice additional feature.
>
> Yes, I agree on both points.
>
>> a) going for the "separate CSS file" approach,
>>
>> b) but copying the CSS file(s) from /usr/share/... to the directory
>> containing the report.
>
> This seems like a good idea.  I will try it out unless others have
> objections to this plan.

I agree that it would be good to have a single shared CSS file for
temporary reports viewed from within Octave.

For files that are exported, is it unreasonable to insert the CSS in the
HTML file itself?  How large is the CSS data?  I expect that people will
forget that they need to transfer two files if they want to share the
files with others.

Having two files may also complicate things for people who wish to view
the files they receive.  Will they be able to just view directly from a
mail reader or web browser, or will they have to save the CSS file first
before they can properly view the HTML file?HTML file?

jwe



Reply | Threaded
Open this post in threaded view
|

Re: HTML export of profiler data

Daniel Kraft
Hi John!

On 2016-02-25 19:28, John W. Eaton wrote:

> On 02/25/2016 01:18 PM, Daniel Kraft wrote:
>> On 2016-02-25 09:07, Julien Bect wrote:
>>> Le 24/02/2016 19:24, Daniel Kraft a écrit :
>>>> We could create a standalone CSS file that contains our rules (might be
>>>> more in the future, or we might also add JS files to enhance the report
>>>> even more).  This file could be installed in a /usr/share location, and
>>>> then referenced (at this location) from the generated HTML files.  This
>>>> seems like a cleaner way, although it means that HTML files may not be
>>>> portable to other machines -- not sure if that should be a design goal
>>>> or not.
>>
>>> a) going for the "separate CSS file" approach,
>>>
>>> b) but copying the CSS file(s) from /usr/share/... to the directory
>>> containing the report.
>
> I agree that it would be good to have a single shared CSS file for
> temporary reports viewed from within Octave.
>
> For files that are exported, is it unreasonable to insert the CSS in the
> HTML file itself?  How large is the CSS data?  I expect that people will
> forget that they need to transfer two files if they want to share the
> files with others.
This was my first thought as well, but the patch actually already
creates a whole directory of HTML files (for each function, roughly
speaking) linked to each other.  So if there is a directory to send
anyway, adding the CSS file seems like a small additional price to pay
and is probably easier than fiddling the CSS into the HTML file
(although that is not too hard as well).

Yours,
Daniel

--
http://www.domob.eu/
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


signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: HTML export of profiler data

John W. Eaton
Administrator
On 02/25/2016 01:41 PM, Daniel Kraft wrote:

> This was my first thought as well, but the patch actually already
> creates a whole directory of HTML files (for each function, roughly
> speaking) linked to each other.  So if there is a directory to send
> anyway, adding the CSS file seems like a small additional price to pay
> and is probably easier than fiddling the CSS into the HTML file
> (although that is not too hard as well).

OK, I didn't understand that there would be a set of files.  I thought
there would just be one file with the data.  If it is a set of files,
then yes, it does seem reasonable to put the CSS data in a separate file.

jwe