| name old time/op new time/op delta | |
| BinaryTree17 5.44s ± 2% 3.27s ± 2% -39.90% (p=0.000 n=20+19) | |
| Fannkuch11 4.95s ± 2% 2.68s ± 2% -45.87% (p=0.000 n=20+20) | |
| FmtFprintfEmpty 142ns ± 2% 49ns ± 3% -65.39% (p=0.000 n=20+18) | |
| FmtFprintfFloat 765ns ± 2% 260ns ± 2% -66.02% (p=0.000 n=20+20) | |
| FmtFprintfInt 341ns ± 2% 95ns ± 2% -72.08% (p=0.000 n=19+20) | |
| FmtFprintfIntInt 554ns ± 2% 150ns ± 1% -72.95% (p=0.000 n=20+19) | |
| FmtFprintfPrefixedInt 497ns ± 3% 178ns ± 3% -64.12% (p=0.000 n=20+20) | |
| FmtFprintfString 466ns ± 2% 86ns ± 3% -81.54% (p=0.000 n=20+20) | |
| FmtManyArgs 2.23µs ± 2% 0.59µs ± 1% -73.46% (p=0.000 n=20+17) |
| package main | |
| import ( | |
| "sync" | |
| "testing" | |
| ) | |
| func BenchmarkLock(b *testing.B) { | |
| var mu Lock |
| #!/bin/sh | |
| # based on https://gist.github.com/ipedrazas/9c622404fb41f2343a0db85b3821275d | |
| # delete all evicted pods from all namespaces | |
| kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod | |
| # delete all containers in ImagePullBackOff state from all namespaces | |
| kubectl get pods --all-namespaces | grep 'ImagePullBackOff' | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod | |
| # delete all containers in ImagePullBackOff or ErrImagePull or Evicted state from all namespaces |
| package main | |
| import ( | |
| "context" | |
| "flag" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "os" | |
| "os/signal" |
| # Replace "projectname" and "username" | |
| image: golang:1.9 | |
| variables: | |
| BIN_NAME: projectname | |
| ARTIFACTS_DIR: artifacts | |
| GO_PROJECT: gitlab.com/username/projectname | |
| stages: | |
| - build |
Just documenting docs, articles, and discussion related to gRPC and load balancing.
https://github.com/grpc/grpc/blob/master/doc/load-balancing.md
Seems gRPC prefers thin client-side load balancing where a client gets a list of connected clients and a load balancing policy from a "load balancer" and then performs client-side load balancing based on the information. However, this could be useful for traditional load banaling approaches in clound deployments.
https://groups.google.com/forum/#!topic/grpc-io/8s7UHY_Q1po
gRPC "works" in AWS. That is, you can run gRPC services on EC2 nodes and have them connect to other nodes, and everything is fine. If you are using AWS for easy access to hardware then all is fine. What doesn't work is ELB (aka CLB), and ALBs. Neither of these support HTTP/2 (h2c) in a way that gRPC needs.
| package main | |
| import ( | |
| "context" | |
| "errors" | |
| "fmt" | |
| "os/signal" | |
| "syscall" | |
| "time" |
| image: docker:latest | |
| before_script: | |
| - apt-get update -y # Updating the Ubuntu Docker instance. | |
| - python -V # Print out python version for debugging. | |
| - apt install -y zip jq | |
| - pip install awscli --upgrade --user | |
| - export PATH=~/.local/bin:$PATH # Required for awscli. | |
| - aws --version # Print out aws cli version for debugging. |
| // This can be imported via ./bin/gremlin.sh -i describe.groovy | |
| // A variable 'graph' must be defined with a JanusGraph graph | |
| // Run it as a plugin command ':schema' | |
| // :schema describe | |
| // | |
| import org.janusgraph.graphdb.database.management.MgmtLogType | |
| import org.codehaus.groovy.tools.shell.Groovysh | |
| import org.codehaus.groovy.tools.shell.CommandSupport |