Skip to content

Instantly share code, notes, and snippets.

View Zatvobor's full-sized avatar

Alexey Zatvobor

  • Software engineer
  • CET
View GitHub Profile

0.7.0

Aleksey-Zatvors-MacBook-Pro:/opt/datahogs/couch_normalizer[master]$ make test

PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/alekseyzatvor/.rvm/bin:deps/elixir/bin mix test
………………………………

[pid: <0.92.0>, module: :“Users_alekseyzatvor_opt_datahogs_couch_normalizer_examples_1-example-scenarioexs”, new_index: 0, new_uniq: <<35,143,117,154,121,211,79,108,11,187,58,28,226,5,32,166>>, index: 0, uniq: 18643884, name: :“BOOTSTRAP/2-fun-1”, arity: 4, env: [], type: :local]
[pid: <0.92.0>, module: CouchNormalizer.ElixirUpdateIssueTest, new_index: 0, new_uniq: <<151,32,187,217,189,138,168,87,193,166,89,51,157,56,220,21>>, index: 0, uniq: 79234526, name: :“setup/1-fun-0”, arity: 4, env: [], type: :local]

@Zatvobor
Zatvobor / simple_couch_db_doc_behavior.erl
Last active December 12, 2015 06:58
Erlang R15B03, CouchDB branch#1.2.x 1] Why `in_case(single_process)` produces so many `inactive` memory on Mac OS X in case when `<<"medianet:album:10000053">>` document size is 67.19Kb?. besides, `in_case(spawned_processes)` doesn't; 2] moreover, `in_case(spawned_update_processes)` still continue produce an `inactive` memory;
-module(simple_couch_db_doc_behavior).
-compile(export_all).
db_and_doc() ->
{<<"seed_labeled_prod">>, <<"medianet:album:10000023">>}.
read_write() ->
{DbName, DocId} = db_and_doc(),
{ok, Db} = couch_db:open_int(DbName, []),
@Zatvobor
Zatvobor / gist:5003767
Last active September 18, 2018 11:50
Time taken for 10K requests: 3.800 seconds Requests per second: 2631.56 [#/sec] (mean) Time per request: 0.380 [ms] (mean, across all concurrent requests) Failed requests: 0
$ ab -c 100 -n 10000 http://api.tunehog.com/kiosk-graph/unsigned/accounts:user:1356811425576
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking api.tunehog.com (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
@Zatvobor
Zatvobor / gist:5003806
Created February 21, 2013 10:36
Time taken for tests: 14.231 seconds Complete requests: 10000 Failed requests: 81 (Connect: 0, Receive: 0, Length: 81, Exceptions: 0) Write errors: 0 Time per request: 1.423 [ms] (mean, across all concurrent requests)
$ ab -c 100 -n 10000 http://accounts.tunehog.com/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking accounts.tunehog.com (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
@Zatvobor
Zatvobor / gist:5013360
Last active December 14, 2015 02:28 — forked from rnewson/gist:2387973
This is edited list of CouchDB Future Features which might as well be a part of https://github.com/datahogs/couch_gears. Check http://en.wikipedia.org/wiki/MoSCoW_Method for more about special tags such a #MUST, #SHOULD, #COULD, #WONT
User Facing Features
====================
#WONT 1. Conflicts are the rule, not the exception
All previous versions of CouchDB hide conflicts by default (selecting
an arbitrary but consistent winning revision). Expert users can find
and resolve conflicts.
Instead, expose the true picture by default, this includes;
WtiKioskCli::Labeled::MediaNetApi.get_track_info 74486245
{:success=>true, :data=>{"Success"=>true, "Track"=>{"MnetId"=>"74486245", "Title"=>"Everybody", "Artist"=>{"MnetId"=>"21540", "Name"=>"Madonna", "Images"=>{"Artist180x80"=>"http://images.mndigital.com/artists/000/021/540/b.jpeg", "Artist190x230"=>"http://images.mndigital.com/artists/000/021/540/c.jpeg", "Artist375x250"=>"http://images.mndigital.com/artists/000/021/540/a.jpeg", "Artist200x"=>"http://images.mndigital.com/artists/000/021/540/f.jpeg"}}, "Genre"=>"Rock", "ExplicitLyrics"=>false, "Duration"=>"2:49", "ReleaseDate"=>"11-29-2008", "TrackNumber"=>1, "DiscNumber"=>1, "PriceTag"=>{"Currency"=>"GBP", "Amount"=>0.79, "IsSetPrice"=>false, "WholesalePrice"=>0.54, "PublishingCost"=>0.09}, "Mp3Rights"=>{"CanSampleStream"=>true, "CanPurchaseDownload"=>true, "AlbumPurchaseOnly"=>false, "CanStream"=>false}, "FeaturedArtists"=>[{"MnetId"=>"78839", "Name"=>"Ariel Pink's Haunted Graffiti", "Images"=>{"Artist180x80"=>"http://images.mndigital.com/artists/000/0
/opt/roundscope/roscredit-app   rc  curl -v -u [FILTERED]:[FILTERED] "https://www.kp-dealer.ru:8080/KPDealerWeb/KPBossHttpServer?actionName=PROVIDERS2" | grep "<provider>" | wc -l
* About to connect() to www.kp-dealer.ru port 8080 (#0)
* Trying 31.13.17.134...
* Adding handle: conn: 0x7fc8f2805400
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7fc8f2805400) send_pipe: 1, recv_pipe: 0
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
@Zatvobor
Zatvobor / gist:10106907
Last active August 29, 2015 13:58
Ember.js inception case

The purpose: Check the understanding of core principles

In general: Prioritized TODO lists

In order to prioritize my own activities and manage my personal best. I want to have ability to submit tasks into MUST, SHOULD and COULD queues.

Acceptance criteria, application should:

  • be available from plain index.html and should not have any jQuery based snippets;
  • use DS.FixtureAdapter;
function Human (sex, age, name) {
this.sex = sex;
this.age = age;
this.name = name;
}
Human.prototype.say = function() {
console.log('my name is ' + this.name);
};
@Zatvobor
Zatvobor / gist:a10851906923e60b8a05
Created February 20, 2015 15:07
Ability to use Multiple Trackers for tracking the same users behavior
EmberInsights.configure('development')
.track({
trackerFactory: EmberInsights.ATracker.factory,
insights: EmberInsightsMapping.development.insights,
})
.track({
trackerFactory: EmberInsights.BTracker.factory,
insights: EmberInsightsMapping.development.insights,
});