[Locust] 2. Locust를 통한 언어와 프레임워크 별 테스트
·
Python/Open Source
테스트용 Locust 설정 locust.conf locustfile = locust_impl.py headless = true expect-workers = 5 host = http://localhost:8000 users = 10 spawn-rate = 10 run-time = 30s locust_impl.py from locust import task, FastHttpUser class TargetURL: ROOT = "/" STRING = "/string" JSON = "/json" CALC = "/calc" class LocustImpl(FastHttpUser): @task def root(self): self.client.get(TargetURL.ROOT) @task def string(self..
[Locust] 1. Locust 부하 테스트 툴(load testing tool)
·
Python/Open Source
Locust란? https://locust.io/ https://docs.locust.io/en/stable/ Locust는 오픈 소스로 제공하는 부하 테스트 툴 프레임워크. 매우 간단한 소스코드를 통해 기능을 수행할 수 있고 제공해주는 설정들을 통해서 유저 수량 지정 테스트 등 다양한 테스트를 진행 할 수 있음. 간단한 개발과 설정으로 빠르게 테스트를 할 수 있는 환경을 갖출 수 있음. 설치 pip install locust 실행 locust.conf locustfile = locust_impl.py expect-workers = 5 host = http://localhost:8000 users = 10 spawn-rate = 10 run-time = 1m locust_impl.py from locus..
[Go] Linked List 구현
·
Go
package datastruct import ( "fmt" ) type LinkedList struct { Head *Node Tail *Node Size int } type Node struct { Data any Next *Node } func NewLinkedList() *LinkedList { return &LinkedList{ Head: nil, Tail: nil, Size: 0, } } func newNode(value any) *Node { return &Node{ Data: value, Next: nil, } } func (list *LinkedList) Lpush(value any) { node := newNode(value) if list.Head == nil { list.Head =..
[Go] File 정보 확인
·
Go
Go File 정보 확인 package file import ( "fmt" "os" "runtime" "syscall" "time" ) const FILE_PATH = "data/big_data.txt" type myFile struct { file *os.File } func newMyFile(file *os.File) *myFile { f := myFile{ file: file, } return &f } func (f *myFile) showStat() { stat, err := f.file.Stat() if err != nil { panic(err) } /* type FileInfo interface { Name() string // base name of the file Size() int64 /..
Golang
·
Go
Go Go 소개 2007년 구글에서 개발을 시작하여 2012년 GO 버젼 1.0을 완성. (현재 1.17 까지 realase) 디자인은 로버트 그리즈머, 롭 파이크, 케네스 톰슨 (대학교 전공 서적에 나오는 사람, C언어 만든 사람) 이 진행 Using at Use cases https://go.dev/solutions/#case-studies 특징 컴파일 언어 정적 타이핑 언어 함수형 언어 빠른 속도 일차적 개발 목적은 시스템 프로그래밍 직접 개발하면서 느낀 장점과 단점 장점 Go 는 문법이 매우 간단하고 배우기 쉽다 문법은 C++, Java, Python 장단점 섞어 놓은 느낌 동시성 기능 구현 쉬움 배포 Architecture 관점에서 진짜 진짜 쉬운 배포 모든 Go 프로젝트는 누가 개발하든 모두 ..