Announcement

Collapse
No announcement yet.

Benchmark Store Morph Processing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Benchmark Store Morph Processing

    How can I display benchmark processing time? I know this is an old topic but with the recent changes in Miva9 it may be relevant again.

    Code:
    <mvt:assign name="g.benchmark_open" value="time_t_sec(s.dyn_time_t, s.dyn_stm_zone)" />
    
    //
    
    <mvt:assign name="g.benchmark_close" value="time_t_sec(s.dyn_time_t, s.dyn_stm_zone)" />
    <mvt:assign name="g.benchmark_processing" value="g.benchmark_close - g.benchmark_open" />
    
    <script>
        console.log("Benchmark_Processing: &mvt:global:benchmark_processing;");
    </script>
    I've tried different values for the time zone, local, -3 etc. and can't get it to work. The g.benchmark_open evaluates but the g.benchmark_close does not.

    Also, how do you get it to evaluate in milliseconds?
    http://www.alphabetsigns.com/

    #2
    Re: Benchmark Store Morph Processing

    Why don't you use toolbelt, it's built-in ;)
    Andreas Toman
    PCINET, LLC

    Miva Merchant Design, Development, Integration & Support
    We built over 200 Miva Merchant stores!
    Miva shopping cart design & integration service and see our Portfolio!


    e-mail: [email protected]
    web: www.pcinet.com
    LinkedIn: Andreas Toman
    phone: (786) 250-2056 (Miami, FL)

    Comment


      #3
      Re: Benchmark Store Morph Processing

      :)

      I think you want:

      <mvt:assign name="g.benchmark_open" value="s.dyn_time_t" />

      //

      <mvt:assign name="g.benchmark_close" value="s.dyn_time_t" />
      <mvt:assign name="g.benchmark_processing" value="g.benchmark_close - g.benchmark_open" />

      For milliseconds, there is a separate value s.dun_tm_usec, but no way I know to combine the two to actually get the total time elapsed in milliseconds...so...there's toolbelt :)
      Bruce Golub
      Phosphor Media - "Your Success is our Business"

      Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
      phosphormedia.com

      Comment


        #4
        Re: Benchmark Store Morph Processing

        Thanks Bruce, s.dyn_tm_usec worked.

        I'm still trying to wrap my head around a microsecond.

        I also found for modern browsers:

        Code:
        <script>
        console.time("benchmark");
        </script>
        
        <script>
        console.timeEnd("benchmark");
        </script>
        For posterity:

        Millisecond = one thousands of a second
        Microsecond = one millionth of a second
        Nanosecond = one billionth of a second
        http://www.alphabetsigns.com/

        Comment

        Working...
        X