Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If the platform looks like it should have DTrace available, log a failure to load the bindings. #106

Open
zhy1 opened this issue Nov 4, 2017 · 0 comments

Comments

@zhy1
Copy link

zhy1 commented Nov 4, 2017

var os, fs, dtrace;
if (runtimeEnv === 'browser') {
    os = {
        hostname: function () {
            return window.location.host;
        }
    };
    fs = {};
    dtrace = null;
} else {
    os = require('os');
    fs = require('fs');
    try {
        dtrace = require('dtrace-provider' + '');
    } catch (e) {
        dtrace = null;
    }
}
If the platform looks like it  should  have DTrace  available, log a failure to load the bindings.

```
![image](https://user-images.githubusercontent.com/14029393/32403335-39efc426-c105-11e7-93e9-4489f191f4a8.png)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant