Skip to content

Instantly share code, notes, and snippets.

View danikin's full-sized avatar

Dennis Anikin danikin

  • Mail.Ru Group
  • Moscow
View GitHub Profile
#include <iostream>
using namespace std;
int main()
{
int a, b, k;
cout << "Enter a,b,k" << endl;
/*
Общая логика взаимодействия бэкенда и модели
1. Бэкенд хранит внутри себя актуальную структуру данных:
- Список базисов отгрузки (см. struct Basis)
- Список транспортных компаний (см. struct TransportCompany)
- Список ТС (см. struct Vehicle)
- Список клиентов
@danikin
danikin / tar_async.cpp
Last active January 30, 2019 03:24
Asynchronous client for Tarantool with synchronous interface
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
#include <tarantool/tarantool.h>
#include <tarantool/tnt_net.h>
#include <tarantool/tnt_opt.h>
#include <pthread.h>
#include <errno.h>
#include <string.h>
// sudo yum install gcc-c++
// gcc -std=gnu++0x -DNDEBUG -O3 just_stl.cpp -lstdc++ -o just_stl
// time ./just_stl
#include <unordered_map>
int main()
{
std::unordered_map<int, int> m;
for (int i = 0;i < 10000000;++i)
m[i*i] = i;
@danikin
danikin / tar_test.c
Last active December 18, 2020 07:28
Tarantool Quick Test
// Tarantool quick test
// Copyright, Dennis Anikin 2016
//
// Quick disclaimer:
//
// This test shows 500K-1000K transactions per second on one CPU core
// and 600K-1600K queries per second on one CPU core.
//
// Based on the $6.57 per-month-price for the AWS t2.micro instance we can afford the tremendous number of 630bln queries for just $1
//
@danikin
danikin / tar_test.c
Last active October 6, 2016 14:17
Load test for Tarantool
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
#include <tarantool/tarantool.h>
#include <tarantool/tnt_net.h>
#include <tarantool/tnt_opt.h>
#include <pthread.h>
#include <errno.h>
#include <string.h>