{"id":20047302,"url":"https://github.com/nsardo/latency-sim","last_synced_at":"2026-05-24T16:34:25.591Z","repository":{"id":88610596,"uuid":"90195564","full_name":"nsardo/latency-sim","owner":"nsardo","description":"Cache most frequent calls that take the longest","archived":false,"fork":false,"pushed_at":"2018-03-14T04:36:31.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-02T08:18:52.425Z","etag":null,"topics":["cpp","experiment"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nsardo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-03T21:37:39.000Z","updated_at":"2018-03-14T04:36:32.000Z","dependencies_parsed_at":"2024-03-25T09:15:30.793Z","dependency_job_id":null,"html_url":"https://github.com/nsardo/latency-sim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nsardo/latency-sim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsardo%2Flatency-sim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsardo%2Flatency-sim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsardo%2Flatency-sim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsardo%2Flatency-sim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nsardo","download_url":"https://codeload.github.com/nsardo/latency-sim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsardo%2Flatency-sim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33442525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-24T13:13:05.286Z","status":"ssl_error","status_checked_at":"2026-05-24T13:13:03.728Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","experiment"],"created_at":"2024-11-13T11:35:24.075Z","updated_at":"2026-05-24T16:34:25.576Z","avatar_url":"https://github.com/nsardo.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LatencySim\n\n ## ROUGH DRAFT\n \n ### EXPLORATORY CODE\n Heuristic to simulate a blocking call to various processes that will take a varying length of time:\n Cache the calls that consistently take the longest, and/or are called the most frequently, into \n memory so that they can be immediately returned, cutting down on latency. These variables are controlled by magic numbers at the top of the file.\n\n### OPERATION\nAs each call is made, an execution record saves the following metrics:\n- call name\n- duration of latency for that call\n- moving average of latency\n- how many times the call has been made\n\nEach time the same call is made, parts of the execution record are updated, and if the call is cached, it is returned.\n\nPeriodically, a sort of \"garbage collector\" scans through the cache to remove cached calls that don't meet the parameters chosen. Obviously as the cache get's larger, this wouldn't be a great strategy. This activity could possibly be ported to a cronjob, or the cache could be progressively bifurcated and cleaned in paralell processes.\n\n ### Binary build on OS X system\n To build on your system, you'll require CMake. Then, open a terminal within the\n project and enter:\n ```\n cmake CMakeLists.txt\n ```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnsardo%2Flatency-sim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnsardo%2Flatency-sim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnsardo%2Flatency-sim/lists"}