메뉴 건너뛰기

OBG

Programming

Library
2012.08.02 21:16

Google의 C++ 라이브러리

조회 수 439 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
C++ 관련 자료를 찾다 보면 
Google에서 공개한 자료를 많이 접할 수 있게 됩니다.

뭐 사실 C++의 Library야 찾아보면 다른 Library도 많습니다만...
Google의 자료들은 몇가지 공통적으로 기본빵을 해주는게 몇 가지 있는데..
 - 오픈소스라서 소스레벨의 접근이 가능합니다.
 - 라이선스가 BSD/MIT 입니다. 즉 GPL이 아니라서 라이선스 제약이 상대적으로 덜 합니다.
 - 멀티 플랫폼을 지원합니다. (Windows/Linux은 기본으로 됩니다.)
 - 마지막으로 Google이라는 거대 회사에서 직접 적용해본 도입 사례가 있습니다.


제가 찾은 Google의 자료를 공유 합니다. 이밖에 좋은 자료가 있으시면 공유 부탁드립니다.


#. Google Test & Google Mock
 - Google Test: Google C++ Testing Framework
 - Google Mock: Google C++ Mocking Framework

   C++의 xUnit 도구들이 상당히 많은데.. 사용하다보면 뭔가 하나씩 부족한 느낌이 듭니다.
  그 중에서 제일 덜 부족한 느낌이 드는게 Google Test가 아닌가 싶습니다.







#. Google Performance Tools
 - Google Perftools: Fast, multi-threaded malloc() and nifty performance analysis tools

   멀티쓰레드에서 더욱 좋은 성능을 내는 TCMalloc(Thread-Caching Malloc), CPU Profiler를 제공 합니다. TCMalloc에는 HeapProfiler와 HeapChecker포함되어 있습니다. 하지만, Windows 쪽은 지원이 미약하며 다른 좋은 것들도 많기 때문에 Linux에서 쓰기에 적합하다고 할 수 있겠습니다.







#. Google Log
 - Google glog: Logging library for C++

   glog는 Application Level Logging을 할 때 쓰는 Library입니다. 서버 Application을 만든다면 반드시 어떠한 방식으로든 로깅 기능을 사용할텐데 참조가 될만한 Library입니다. 직접 써도 좋을 것 같다는 생각도 들고요.

  인상적인 부분중에 하나는 google::InstallFailureSignalHandler() 함수 하나만 호출하면.. SIGSEGV 등을 받으면 아래와 같이 Logging을 하게 해준다고 합니다. 매우 편할 것 같습니다. 

*** SIGSEGV (@0x0) received by PID 17711 (TID 0x7f893090a6f0) from PID 0; stack trace: *** PC: @ 0x412eb1 TestWaitingLogSink::send() @ 0x7f892fb417d0 (unknown) @ 0x412eb1 TestWaitingLogSink::send() @ 0x7f89304f7f06 google::LogMessage::SendToLog() @ 0x7f89304f35af google::LogMessage::Flush() @ 0x7f89304f3739 google::LogMessage::~LogMessage() @ 0x408cf4 TestLogSinkWaitTillSent() @ 0x4115de main @ 0x7f892f7ef1c4 (unknown) @ 0x4046f9 (unknown)







#. Google Sparse Hash
 - Google Sparse Hash: An extremely memory-efficient hash_map implementation

 긴 설명 보다는 아래 테스트 결과가 많은 것을 말해줄 수 있을 것 같습니다.

Average over 10000000 iterations
Wed Dec  8 14:56:38 PST 2004

SPARSE_HASH_MAP:
map_grow                  665 ns
map_predict/grow          303 ns
map_replace               177 ns
map_fetch                 117 ns
map_remove                192 ns
memory used in map_grow    84.3956 Mbytes

DENSE_HASH_MAP:
map_grow                   84 ns
map_predict/grow           22 ns
map_replace                18 ns
map_fetch                  13 ns
map_remove                 23 ns
memory used in map_grow   256.0000 Mbytes

STANDARD HASH_MAP:
map_grow                  162 ns
map_predict/grow          107 ns
map_replace                44 ns
map_fetch                  22 ns
map_remove                124 ns
memory used in map_grow   204.1643 Mbytes

STANDARD MAP:
map_grow                  297 ns
map_predict/grow          282 ns
map_replace               113 ns
map_fetch                 113 ns
map_remove                238 ns
memory used in map_grow   236.8081 Mbytes






#. Google CoreDumper
 - Google CoreDumper: A neat tool for creating GDB readable coredumps from multithreaded applications

  Runtime에 원하는 시점의 Memory를 Dump할 수 있는 기능입니다.
  ASSERT를 걸어야할 시점이 Runtime에서 한참 작업을 진행중이라면 Core만 떠두고, 일단 작업을 진행하도록 한 다음에 나중에 수정하여 업데이트 하는 방법이 있겠습니다.
 (당연히도) Linux만 지원됩니다.


#. 그 밖에..
 - gflags: Commandline flags module for C++
 - Keyczar: Toolkit for safe and simple cryptography
 - Breakpad: An open-source multi-platform crash reporting system
 - Omaha: Software installer and auto-updater for Windows
 - Protocol Buffers: Google's data interchange format

그리고 꼭 읽어보길 권장하는...

?

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 Tool/etc Programming 게시판 관련 2 MoA 2014.11.01 1709
46 Tool/etc 쿠버네티스 클러스터 OBG 2022.11.11 112
45 Web defer, async 스크립트 OBG 2023.01.10 110
44 서버 Caching in Node.js to optimize app performance OBG 2023.01.16 86
43 Tool/etc How To Set Up Multi-Factor Authentication for SSH on Ubuntu 20.04 OBG 2023.01.17 97
42 Database 수신 기한이 지난 데이터를 MySQL에서 삭제할 때의 이야기 OBG 2023.01.25 74
41 Python FastAPI 톺아보기 - 부제: python 백엔드 봄은 온다 OBG 2023.01.25 118
40 Site 개발에 도움되는 사이트 (초보 개발자 꿀팁) OBG 2023.01.28 91
39 서버 Caching In Node.js Applications OBG 2023.03.03 98
38 Deeplearning LLaMA: INT8 edition OBG 2023.03.09 78
37 서버 PM2를 활용한 Node.js 무중단 서비스하기 OBG 2023.03.09 104
36 Tool/etc 잡담) AWS에 서버 띄워 놓으니 벼라별 리퀘스트가 다 날아 오네요 OBG 2023.03.11 91
35 Deeplearning 추천 시스템 OBG 2023.03.30 120
34 Deeplearning Reinforcement Learning for Dynamic Pricing Suggestion OBG 2023.04.01 126
33 서버 SSH-Tunneling을 통한 MySQL 서버 연결 OBG 2023.04.21 132
32 서버 Design a Basic Search Engine (Google or Bing) | System Design Interview Prep OBG 2023.05.27 116
31 Python Numpy의 axis 변경 OBG 2023.06.09 72
30 Deeplearning [한빛미디어] 머신러닝·딥러닝 도서 선택 가이드 OBG 2023.06.11 70
29 LLM LLM 출력 속도 24배 높여주는 라이브러리 등장했다 OBG 2023.06.30 65
28 서버 Debugging Node.js Memory Leaks: How to Detect, Solve or Avoid Them in Applications OBG 2023.07.04 117
27 Deeplearning PyTorch 딥러닝 챗봇 OBG 2023.07.04 79
Board Pagination Prev 1 ... 6 7 8 9 10 11 12 13 14 ... 15 Next
/ 15
위로