Giter VIP home page Giter VIP logo

doc's Introduction

Hi there ๐Ÿ‘‹

doc's People

Contributors

acheronfail avatar dependabot[bot] avatar dnlup avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

doc's Issues

Every metric should support start/stop

Because a Sampler instance can be stopped, it would be nice if all the metrics supported starting and stopping/destroying on demand without creating a new Sampler.

Reuse Node types

Let's try to see if we can reuse Node types in the declarations.

Duplicate commits

I must have done something wrong during a rebase. From version 2.0.2 to version 3.0.1, I found out that I am carrying duplicate commits. I have fixed that on the branch next, which is now the repo's default branch, but I cannot fix it in the already published tags. That would require unpublishing those versions from npm, rewriting the changelog, and making new tags. A lot of things could go wrong in the process. I'll do better next time. I should have known better. I sincerely apologize.

/cc @acheronfail

I'll keep this open for a bit as a reminder.

Remove `raw` field in `data` event object

Keeping this field is starting to be cumbersome. Once the set of options for the event loop delay gives the user enough flexibility I think it should be removed.

Improve benchmarks workflow

Benchmarks result could be automatically parsed and validated using JSON. Now, they still have to be manually inspected.

Deprecation notice

We should fix this deprecation notice:

(node:53274) [DEP0152] DeprecationWarning: Custom PerformanceEntry accessors are deprecated. Please use the detail property.

Add benchmarks

Add benchmarks to keep the overhead in check. The manual tests I have done so far are using a barebone http server to see if its req/sec throughput is affected, which is not so far. It will be useful for the future as we add new metrics to be collected.

GC stats

Consider adding garbage collection metrics.

The value of "val" is out of range.

Hello,

I've been seeing some intermittent failures with this error.

The value of "val" is out of range. It must be a safe integer greater than 0. Received 0

Based on the stack trace it's coming from here.

https://github.com/dnlup/doc/blob/next/lib/gc.js#L71

The code I have that should be throwing the error is simplified here.

const doc = require('@dnlup/doc');

const sampler = doc({
  collect: {
    gc: true,
    cpu: false,
    memory: false,
    resourceUsage: false,
    eventLoopDelay: false,
    eventLoopUtilization: false,
    activeHandles: false,
  },
});

sampler.on('sample', () => {
  // Other functionality here
});

Is there something on my end that could be wrong and causing this error to be thrown intermittently? It's not easily reproducible.

Thank you.

Handle ELU in worker threads

Node API as a reference:

This also opens up a question: should this module be worker_thread aware? Meaning, if it's running in a worker thread, should it forward metrics to the main thread?

Flaky tests

Tests are flaky right now.

The only platform where they run consistently is Linux. On one side, I would prefer to don't limit the checks on metrics values on just being greater than zero; on the other, I should find a good balance to avoid these random errors.

Use Node native Histogram

I am opening this to remember to use the native Histogram when it will be supported on all Node LTS versions. As of now it's supported only on 16 (see here).

Flaky tests

Unfortunately, tests are getting flaky again. This needs to be looked into.

Sometimes it's just a failed npm install and there's nothing I can do about it, but most of the time it's a failed check on a value, which means that this approach is not super reliable in a CI environment.

Refactor

The current (not published yet) implementation causes a lot of inline caches to get megamorphic. Let's try to avoid that, if possible.

Your .dependabot/config.yml contained invalid details

Dependabot encountered the following error when parsing your .dependabot/config.yml:

The property '#/version' value 2 did not match one of the following values: 1
The property '#/update_configs/0/package_manager' value "npm" did not match one of the following values: javascript, ruby:bundler, php:composer, java:maven, elixir:hex, rust:cargo, java:gradle, dotnet:nuget, go:dep, go:modules, docker, elm, submodules, github_actions, python, terraform

Please update the config file to conform with Dependabot's specification using our docs and online validator.

esm

It is time to start testing/adding esm.

Include count and flags in gc metric

To give a better picture of the GC work happening in the process, I think it should be included in the metric the count for each PerformanceEntry kind and, potentially, flag.

Consider removing build step with ajv

While it is nice to have a JSON schema for defining the configuration options, the generated validate function is not small. Consider changing this approach.

Stream interface

It might be useful to have a streaming api also.

This might introduce a breaking change because I am already using the data event.

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.