Giter Site home page Giter Site logo

Show dump time about kint HOT 4 CLOSED

rozbyn avatar rozbyn commented on June 8, 2024
Show dump time

from kint.

Comments (4)

jnvsor avatar jnvsor commented on June 8, 2024

Well generally kint dumps will be in a web page, in which case all the timestamps would be the same (Or at most off by 1 second if it crosses the boundary during the run) In that case I'd say just stick a timestamp on the page, or override RichRenderer::postRender if you really need it for some specialized logging solution.

The only use cases I can think of for rendering the timestamp on every dump would be if a page is loading really slowly and needs to be debugged, or when you want to measure much smaller time differences than your examples would show anyway. In both those cases we have a microtime() plugin that does the job.

There's also the case of dumps that take a long time, and then there's a question of whether the timestamp would be at the start of a dump, at the end of a dump, or halfway through between the parse and the render. The explicitness of calling microtime() means you (as a user) don't have to worry about any internal timing issues.

Can you think of any special use case where this would be necessary? I wouldn't mind adding it to RichRenderer as an option if you can, but I think it would find more use in TextRenderer where it might be used in logs and the like

from kint.

rozbyn avatar rozbyn commented on June 8, 2024

I think it's may be useful when developer not sure, dump was executed right now, or an hour ago, when content may be same. Sometimes i want to dump into html file like @d();, with good formating, when cron works, or incoming web-hook

from kint.

rozbyn avatar rozbyn commented on June 8, 2024

As an option will be good) If it not very popular feature request - i override RichRenderer::postRender)

from kint.

jnvsor avatar jnvsor commented on June 8, 2024

I wanted to add it for text renderer and it was simple enough (And lightweight enough since it only gets used once on postRender) so I added it to the rich renderer too. 3be3e46

I'll push the documentation when it's tagged

from kint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.