This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| inline int64_t get_monotonous_click() { | |
| static std::atomic<int64_t> last_click{0}; | |
| int64_t timestamp{ | |
| std::chrono::system_clock::now().time_since_epoch() | |
| / std::chrono::microseconds(1)}; | |
| int64_t old_click{last_click.load()}; | |
| int64_t new_click{0}; | |
| do { | |
| new_click = std::max(timestamp, old_click + 1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/CMakeLists.txt b/CMakeLists.txt | |
| index decc40c..a3220e1 100644 | |
| --- a/CMakeLists.txt | |
| +++ b/CMakeLists.txt | |
| @@ -10,7 +10,7 @@ option(rpcz_build_static "Build static library." OFF) | |
| option(rpcz_build_examples "Build rpcz's examples." OFF) | |
| find_package(ProtobufPlugin REQUIRED) | |
| -find_package(Boost REQUIRED COMPONENTS thread program_options) | |
| +find_package(Boost REQUIRED COMPONENTS thread program_options system) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| unique_ptr<string> f(bool b) { | |
| unique_ptr<string> p(new string("ok!")); | |
| unique_ptr<string> p2(new string("okish!")); | |
| if(b) { | |
| return p; | |
| } else { | |
| return p2; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ➜ riakpp git:(master) build/release/src/riaktool -m 10000 -k 10000 | |
| [0] riaktool.cpp:81:main: Creating connection pool... | |
| [0] riaktool.cpp:85:main: Buffering messages... | |
| [0] riaktool.cpp:109:main: Buffered 0 messages. | |
| [0] riaktool.cpp:109:main: Buffered 500 messages. | |
| [0] riaktool.cpp:109:main: Buffered 1000 messages. | |
| [0] riaktool.cpp:109:main: Buffered 1500 messages. | |
| [0] riaktool.cpp:109:main: Buffered 2000 messages. | |
| [0] riaktool.cpp:109:main: Buffered 2500 messages. | |
| [0] riaktool.cpp:109:main: Buffered 3000 messages. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SCALE = 0.1 | |
| XMIN = 820 | |
| GAMMA = 3.63719 | |
| fb_ccdf = ccdf(degs) | |
| xs = array(fb_ccdf[0][500:]) | |
| power_law = array(xs / XMIN) ** (-GAMMA + 1) * SCALE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "metadata": { | |
| "name": "Untitled1" | |
| }, | |
| "nbformat": 3, | |
| "nbformat_minor": 0, | |
| "worksheets": [ | |
| { | |
| "cells": [ | |
| { |
NewerOlder