Skip to content

Instantly share code, notes, and snippets.

View goncalotomas's full-sized avatar

Gonçalo Tomás goncalotomas

View GitHub Profile
@goncalotomas
goncalotomas / Foo.ex
Created July 17, 2020 15:09
Test module
defmodule Foo do
@options %{
"1option" => :ok1,
"2option" => :ok2,
"3option" => :ok3,
"4option" => :ok4,
"5option" => :ok5,
"6option" => :ok6,
"7option" => :ok7,
"8option" => :ok8,
@goncalotomas
goncalotomas / fmke.config
Last active November 22, 2018 13:32
Redis Cluster FMKe Configuration
{database_addresses, ["172.0.10.1", "172.0.10.2", "172.0.10.3", "172.0.10.4", "172.0.10.5"]}.
{database_ports, [7000]}.
{target_database, redis_cluster}.
{connection_pool_size, 64}.
@goncalotomas
goncalotomas / gsoc2018-report.md
Last active August 14, 2018 11:49
GSoC 2018 Technical Report

Project details

Organisation: Beam Community
Team: Riak
Title: Improving Riak testing suites using Common Test and Intercepts
Mentors: Bryan Hunt, Gordon Guthrie, Russell Brown

Project Goals

We proposed to take riak_test, the main integration and regression testing component of the Riak database and improve its reporting abilities. This involved breaking riak_test into its discrete components and using standard tools rather than a bespoke test runner facility that was infamous for being difficult to set up and

@goncalotomas
goncalotomas / gsoc2017-report.md
Last active August 29, 2017 14:25
GSoC 2017 Final Project Report

Project details

Organisation: Beam Community
Team: Lasp-Lang
Title: Implementing a Real World Application in the Lasp Programming Language
Goal: Provide a way to evaluate Lasp's performance by implementing real world applications with it
Mentors: Christopher Meiklejohn and Vitor Enes Duarte

Foreword/Disclaimer

Whilst participating in GSoC I was doing my Master's thesis, which implements a new benchmark tailored for distributed key-value storage systems called [FMKe][111]. Each Lasp server instance participates in a distributed key-value store, so despite initially focusing on evaluating general performance, since there was this common interest, a large focus was given to evaluate only the distributed key value store of Lasp.

@goncalotomas
goncalotomas / riakc_interaction.erl
Last active June 21, 2017 13:06
Interaction with a Riak node in which maps with nested fields are used.
%% Start connection to riak node
{ok, Pid} = riakc_pb_socket:start_link("127.0.0.1",8087).
%% Create new local riak map object.
Map = riakc_map:new().
%% Perform a local update taking the previous map and inserting a nested set inside.
Map1 = riakc_map:update({<<"set">>, set},
%% update a nested key called <<"set">> of type set
%% pass it an update function that adds X and Y to it.
@goncalotomas
goncalotomas / new-benchmark-local.sh
Last active May 29, 2017 07:43
How to run a local FMKe benchmark without an antidote docker image
#!/bin/bash
echo "running small benchmark with antidote..."
# TODO insert command to start up antidote
# or start antidote prior to running this script
# NOTE remember to use a fresh antidote build (no stored data).
# Use 'make relclean' to wipe saved data from antidote
# this script assumes that you have an antidote node reachable at '[email protected]'
./scripts/start_fmke.sh
@goncalotomas
goncalotomas / megaload_test_spec
Last active November 21, 2016 13:56
Megaload dummy script
[{"test" : {"id" : "FMKeTest",
"phases" : ["Phase1"],
"plugins" : ["LocalFMKeNode"]
}},
{"plugin" : {"id" : "LocalFMKeNode",
"plugin_info" : {"http-plugin" : {"servers" : [{"host" : "localhost",
"port" : 9090,
"ssl" : false}
],
@goncalotomas
goncalotomas / fmk_setup_no_index.erl
Last active November 16, 2016 00:22
List of FMK ops to paste in the console to see if everything werks.
%% facilities
fmk_core:create_facility(1,"Weill Cornell Medical Center","New York NY,USA","Hospital").
fmk_core:create_facility(2,"Florida Hospital Orlando","Orlando FL, USA","Hospital").
fmk_core:create_facility(3,"Jackson Memorial Hospital","Miami FL, USA","Hospital").
fmk_core:create_facility(4,"Baptist Medical Center","San Antonio TX, USA","Hospital").
fmk_core:create_facility(5,"Insert name of any dictator here","San Antonio TX, USA","Hospital").
%% integrity check
Facility1 = fmk_core:get_facility_by_id(1).
1 = facility:id(Facility1).
not_found = facility:prescriptions(Facility1).
fmk_core:create_pharmacy(1,"Chai Pharmacy","Costa da Caparica, Portugal").
fmk_core:create_pharmacy(2,"Carlos Pharmacy","Costa da Caparica, Portugal").
fmk_core:create_pharmacy(3,"Definitely not an online scam!","Lisbon, Portugal").
@goncalotomas
goncalotomas / fmk_patients.erl
Created October 26, 2016 14:11
FMK patient insert
fmk_core:create_patient(1,"Goncalo Tomas","Somewhere in DK").
fmk_core:create_patient(2,"Goncalo Tomas","Somewhere in DK").
fmk_core:create_patient(3,"Goncalo Tomas","Somewhere in DK").
fmk_core:create_patient(4,"Goncalo Tomas","Somewhere in DK").
fmk_core:create_patient(5,"Goncalo Tomas","Somewhere in DK").
fmk_core:create_patient(6,"Goncalo Tomas","Somewhere in DK").
fmk_core:create_patient(7,"Goncalo Tomas","Somewhere in DK").
fmk_core:create_patient(8,"Goncalo Tomas","Somewhere in DK").
fmk_core:create_patient(9,"Goncalo Tomas","Somewhere in DK").
fmk_core:create_patient(10,"Goncalo Tomas","Somewhere in DK").