この和訳メモは以下のリンク先の記事の和訳です。
マイクロサービス: クライアントサイドロードバランシング
プロダクションでのフェイルセーフ性を確保するために、同じアプリケーションを複数のインスタンスにデプロイします。 同じアプリケーションをホストする論理的なサーバ(ノード)のグループは Application Clusterを構成します。
この和訳メモは以下のリンク先の記事の和訳です。
マイクロサービス: クライアントサイドロードバランシング
プロダクションでのフェイルセーフ性を確保するために、同じアプリケーションを複数のインスタンスにデプロイします。 同じアプリケーションをホストする論理的なサーバ(ノード)のグループは Application Clusterを構成します。
// summary : Just ONE ammonite script file to execute a load performance test using gatling ! | |
// keywords : scala, gatling, ammonite, scala, load-test, performance | |
// publish : gist | |
// authors : David Crosson | |
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2) | |
// id : ea7a4259-9461-44a8-99fa-1ec6ec3c48ed | |
// created-on : 2018-09-22T07:41:07Z | |
// managed-by : https://github.com/dacr/code-examples-manager | |
// execution : scala ammonite script (http://ammonite.io/) - run as follow 'amm scriptname.sc' |
def urlses(cl: ClassLoader): Array[java.net.URL] = cl match { | |
case null => Array() | |
case u: java.net.URLClassLoader => u.getURLs() ++ urlses(cl.getParent) | |
case _ => urlses(cl.getParent) | |
} | |
val urls = urlses(getClass.getClassLoader) | |
println(urls.filterNot(_.toString.contains("ivy")).mkString("\n") |
object Test { | |
// Implicit class is also a new feature in scala 2.10 | |
implicit class CounterSC(val sc: StringContext) extends AnyVal { | |
// Define functions that we want to use with string interpolation syntax | |
def partsCount(args: Any*): Int = sc.parts.length | |
def argsCount(args: Any*): Int = args.length | |
def tokenCount(args: Any*): Int = sc.parts.length + args.length | |
def getParts(args: Any*): String = |