Skip to content

Instantly share code, notes, and snippets.

View siscia's full-sized avatar

Simone Mosciatti siscia

View GitHub Profile
Hi All,
I am facing a quite interesting problem.
I am trying to implement a new virtual table, everything seems alright, I receive SQLITE_OK code on the registration but as soon as I try to use the vtab that I just created I only get an error: "no such module: $NAME_VTAB"
It seems to me that I followed the documentation quite closely, moreover, I am not doing weird cast or particular alchemy with the code, with the exception that it is rust code and not plain C.
What I do is quite simple, I just call `sqlite3_create_module_v2` passing all the parameter.
@siscia
siscia / benchamark1
Created April 17, 2018 21:10
RediSQL benchmarks
Last login: Tue Apr 17 20:40:55 2018 from 90.41.4.210
ubuntu@ip-172-31-14-12:~$
ubuntu@ip-172-31-14-12:~$
ubuntu@ip-172-31-14-12:~$ cd redis-4.0.9/src/
ubuntu@ip-172-31-14-12:~/redis-4.0.9/src$ ./redis-cli
127.0.0.1:6379> REDISQL.CREATE_DB DB
OK
127.0.0.1:6379> REDISQL.EXEC DB "create table test(a int, b int);"
1) DONE
#include <stdio.h>
#include <stdlib.h>
#include "hiredis.h"
int main() {
redisContext *c;
redisReply *reply;
/* automatically generated by rust-bindgen */
#[repr(C)]
pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>);
impl <T> __BindgenUnionField<T> {
#[inline]
pub fn new() -> Self { __BindgenUnionField(::std::marker::PhantomData) }
#[inline]
pub unsafe fn as_ref(&self) -> &T { ::std::mem::transmute(self) }
#[inline]
extern crate rusqlite;
extern crate libsqlite3_sys as sqlite3;
use std::io::{self, Read};
use std::path::Path;
use std::mem;
use std::ptr;
use std::ffi::{CString, CStr};
use rusqlite::Connection;
| exp IF exp ELSE exp {
if ($3.expression_type == IMMEDIATE){
if ($3.value) {
$$ = $1;
} else {
$$ = $5;
}
} else {
t_axe_label* exit = newLabel(program);
t_axe_label* else_branch = newLabel(program);
=== REDIS BUG REPORT START: Cut & paste starting from here ===
5867:M 28 Nov 13:28:29.432 # Redis 999.999.999 crashed by signal: 11
5867:M 28 Nov 13:28:29.432 # Crashed running the instuction at: 0x4bf5bc
5867:M 28 Nov 13:28:29.432 # Accessing address: 0x200400640
5867:M 28 Nov 13:28:29.432 # Failed assertion: <no assertion failed> (<no file>:0)
------ STACK TRACE ------
EIP:
./redis-server *:6379(je_malloc_usable_size+0x3c)[0x4bf5bc]
sig License{}
sig Credential{}
sig User {
drivingLicense: one License,
credential: lone Credential
}
fact oneLicenseForUser {
no l: License, u, u': User | u != u' and l in u.drivingLicense and l in u'.drivingLicense
\section*{Abstract}
L'esplosione di internet ha portato alla raccolta di un quantitativo di dati mai visto prima; la necessità di analizzare e trarre valore da questa grande quantità di dati ha reso fondamentale l'uso di applicazioni distribuite su più macchine.
L'uso di applicazioni distribuite rende però molto difficile stimare il tempo di completamento dei task sottomessi, metrica che invece è di estremo interesse sia per gli utilizzatori del cluster che per chi lo gestisce.
In questo lavoro ci siamo concentrati nella analisi del tempo di completamento di job MapReduce eseguiti su Hadoop usando il framework MARC.
I risultati ottenuti sono incoraggianti, ma non ancora utilizzabili per ottenere stime reali di tempi di completamento.
\section{Introduzione}
L'esplosione di internet ha portato alla raccolta di un quantitativo di dati mai visto prima; la necessità di analizzare e trarre valore da questa grande quantità di dati ha reso fondamentale l'uso di applicazioni distribuite su più macchine.
slope phase maps blocksize dimension start_reduce reducers replication reduce_buffer_io start_percentage end_percentage
2 0.188338293928771 1 375 133120000 4.9e+10 5 24 4 100 6 122
7 0.160270615352683 1 1201 33280000 3.92e+10 50 12 2 100 51 131
12 0.0787062082376971 1 1802 16640000 2.94e+10 50 48 2 100 51 111
17 0.238429714945174 1 400 99840000 3.92e+10 5 12 4 100 6 132
21 0.106242737810447 1 1802 16640000 2.94e+10 50 12 3 100 51 132
26 0.383769653172287 1 223 134217728 2.94e+10 5 6 2 100 6 132
31 0.158803533013214 1 372 134217728 4.9e+10 5 48 4 100 6 114
36 0.25298897032558 1 225 133120000 2.94e+10 35 24 4 100 36 123
41 0.354143534161834 1 223 134217728 2.94e+10 5 12 4 100 6 131