Skip to content

Instantly share code, notes, and snippets.

@csrl
csrl / local_thr
Created February 18, 2011 03:55
csrl/erlzmq performance test escripts
#! /usr/bin/env escript
%%! -K true -smp enable -pa ../ebin
main([BindTo,MessageSizeStr,MessageCountStr]) ->
{MessageSize, _} = string:to_integer(MessageSizeStr),
{MessageCount, _} = string:to_integer(MessageCountStr),
{ok, Context} = zmq:init(1),
{ok, Socket} = zmq:socket(Context, sub),
ok = zmq:setsockopt(Socket ,[{subscribe, ""}]),
ok = zmq:bind(Socket, BindTo),
@csrl
csrl / example_use.lua
Last active August 29, 2015 14:06 — forked from azdle/example_use.lua
local oneprpc = require 'oneprpc'
local json = require 'json'
local rpc = oneprpc:new({cik = "9829879a04efb8f4a1b42e22245739678fd4a94e"})
local status, rid = rpc.create(
"dataport",
{
format = "float",
name = "Temperature",