Skip to content

Instantly share code, notes, and snippets.

View davinci26's full-sized avatar
😀
Always happy

Sotiris Nanopoulos davinci26

😀
Always happy
View GitHub Profile
google.com
facebook.com
youtube.com
instagram.com
googletagmanager.com
youtu.be
goo.gl
bit.ly
blogspot.com
whatsapp.com
@davinci26
davinci26 / gist:eab544c63bed41d7d6891b9af413ff6b
Created May 13, 2021 16:22
OSM ./pkg/catalog data race
{"level":"debug","component":"mesh-catalog","time":"2021-05-12T18:25:54-07:00","file":"inbound_traffic_policies.go:222","message":"Discovered TrafficSpec resource: default/bookstore-service-routes"}
{"level":"debug","component":"mesh-catalog","time":"2021-05-12T18:25:54-07:00","file":"inbound_traffic_policies.go:249","message":"Constructed HTTP path routes: map[HTTPRouteGroup/default/bookstore-service-routes:map[buy-books:{Path:/buy PathMatchType:0 Methods:[GET] Headers:map[user-agent:test-UA]} sell-books:{Path:/sell PathMatchType:0 Methods:[GET] Headers:map[user-agent:test-UA]}]]"}
{"level":"debug","component":"mesh-catalog","time":"2021-05-12T18:25:54-07:00","file":"inbound_traffic_policies.go:222","message":"Discovered TrafficSpec resource: default/bookstore-service-routes"}
{"level":"debug","component":"mesh-catalog","time":"2021-05-12T18:25:54-07:00","file":"inbound_traffic_policies.go:249","message":"Constructed HTTP path routes: map[HTTPRouteGroup/default/bookstore-service-routes:map[buy-books:{Path:/b
@davinci26
davinci26 / envoy-config.yaml
Created February 12, 2021 00:23
Envoy Config for original dst
listeners:
- address:
socket_address:
address: 0.0.0.0
port_value: 8001
traffic_direction: OUTBOUND
filter_chains:
- filters:
- name: tcp_proxy
typed_config:
@davinci26
davinci26 / socket.cpp
Created October 7, 2020 20:55
TCP_INFO usage on Windows
#define WIN32_LEAN_AND_MEAN
#define _CRT_SECURE_NO_WARNINGS
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#include <windows.h>
#include <winsock2.h>
#include <mstcpip.h>
#include <iostream>
@davinci26
davinci26 / Dockerfile-frontend.dockerfile
Last active September 30, 2020 16:56
Envoy on Windows - Demo snippets
FROM mcr.microsoft.com/windows/servercore:ltsc2019
# Copy envoy and its configuration
RUN powershell -Command mkdir envoy-config/
ADD ./envoy-frontend.yaml ./envoy-config/envoy-frontend.yaml
ADD ./envoy-static.exe ./envoy-static.exe
# Create a log folder to store the stats
RUN powershell -Command mkdir logs/
@davinci26
davinci26 / file.md
Last active April 5, 2022 19:21
Debugging Envoy Tips and Snippets

Debuging Envoy Tests

( I am working on porting Envoy to Windows, so my dev env is Windows. If you stumble upon this and you are working from a linux env some of the tips may not apply to you)

General

  1. Use Envoy -l trace && -l debug flags for verbose logs
  2. If the compiler runs out of memory set --local_cpu_resources=4 in bazel build options
  3. To run tests multiple times --cache_test_results=no --runs_per_test=1000
  4. To pass test arguments to bazel --test_arg=--use_xxx
./cx_limit_integration_test.exe : TestRandomGenerator running with seed -56759716
At line:1 char:1
+ ./cx_limit_integration_test.exe --gtest_filter=*IpVersions/Connection ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (TestRandomGener... seed -56759716:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
[info][testing] [test/integration/fake_upstream.cc:465] starting fake server on socket 0.0.0.0:0. Address version is v4. UDP=false
[debug][misc] [test/integration/integration.cc:352] Setting up file-based LDS
@davinci26
davinci26 / commands
Last active August 14, 2020 21:17 — forked from sunjayBhatia/commands
Envoy tests failing on Windows
# Find failing tests
bazel query 'kind(".*test rule", attr("tags", "fails_on_windows", //test/...))' | sort
# Find flaky tests
bazel query 'kind(".*test rule", attr("tags", "flaky_on_windows", //test/...))' | sort
# Find skipped tests
bazel query 'kind(".*test rule", attr("tags", "skip_on_windows", //test/...))' | sort
Fund(years) ETF CAGR IWO CAGR Hedge Valuation Baseline Valuation Avg growth per hedge
8.35 GOVT 10.69% 9.47% 11818.67$ (1.1x) 10757.24$ 19%
10.61 VGIT 12.03% 11.36% 16973.35$ (1.07x) 15928.99$ 11%
17.93 TLT 15.09% 9.21% 64350.84$ (2.59x) 24824.40 79%