Files
Chris Andrews 739e1a7098 Support an argument type of "json", serialising argument values.
This change allows objects to be passed as argument values, using a
"json" type which is implemented as a regular char * argument, but
with serialising of the object to JSON.
2012-12-02 00:21:52 +00:00

13 lines
264 B
JavaScript

var d = require('../dtrace-provider');
var provider = d.createDTraceProvider("nodeapp");
var probe = provider.addProbe("json1", "json");
provider.enable();
var obj = new Object;
obj.foo = 42;
obj.bar = 'forty-two';
probe.fire(function(p) {
return [obj];
});