Skip to content

Feature request: high resolution timestamp variable #6

@PAStheLoD

Description

@PAStheLoD

Hello,

I'd like to put a timestamp into my upstream request URIs (or include it as a request header with the HeardsMore module), so it'd be great if you could implement a few other special variables:

  • tsc_time using a crude but fast solution[0] of reading the TSC register and dividing it with the MHZ from /proc/cpuinfo ~ 50 cycles
  • gettimeofday: ngx_gettimeofday is just a macro for gettimeofday( tp, NULL) ~ 10K cycles
  • clock_gettime(CLOCK_MONOTONIC , ...) or with other CLOCK_* ~ 10K cycles

Thanks!

[0] http://stackoverflow.com/questions/88/is-gettimeofday-guaranteed-to-be-of-microsecond-resolution/367#367

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions