Files
node-dtrace-provider/test/multiple-json-args_fire.js
T
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

12 lines
282 B
JavaScript

var d = require('../dtrace-provider');
var provider = d.createDTraceProvider("nodeapp");
var probe = provider.addProbe("json1", "json", "json");
provider.enable();
var obj1 = { "value": "abc" };
var obj2 = { "value": "def" };
probe.fire(function(p) {
return [obj1, obj2];
});