Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Curious about the "energy impact" metric. It seems to be just runtime. Fairly lame, had expected some kind of real energy model. This will be quite misleading in many cases, e.g. GPU usage or heavy floating point.

    // 'Dispatches' doesn't make sense to users, and it's difficult to present
    // two numbers in a meaningful way, so we need to somehow aggregate the
    // dispatches and duration values we have.
    // The current formula to aggregate the numbers assumes that the cost of
    // a dispatch is equivalent to 1ms of CPU time.
    // Dividing the result by the sampling interval and by 10 gives a number that
    // looks like a familiar percentage to users, as fullying using one core will
    // result in a number close to 100.
    let energyImpact =
      Math.max(duration || 0, dispatches * 1000) / UPDATE_INTERVAL_MS / 10;
    // Keep only 2 digits after the decimal point.
return Math.ceil(energyImpact * 100) / 100;


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: