메뉴 건너뛰기

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 1725
287 Tool/etc Synology: Top Best Apps For Docker OBG 2024.07.01 2
286 LLM PEFT: Parameter-Efficient Fine-Tuning of Billion-Scale Models on Low-Resource Hardware OBG 2024.04.15 15
285 LLM Anthropic, LLM의 내부를 이해하는데 있어 상당한 진전을 보임 OBG 2024.06.03 17
284 LLM [VESSL AI] 뉴욕주민의 프로젝트플루토 — LLM, LLMOps를 활용한 금융 미디어의 혁신 OBG 2024.04.21 18
283 LLM A Beginner's Guide to Prompt Engineering with GitHub Copilot OBG 2024.04.04 19
282 LLM How LLMs Work ? Explained in 9 Steps — Transformer Architecture OBG 2024.04.11 21
281 LLM ChatGPT의 강력한 경쟁 언어모델 등장!, Mixtral 8x7B OBG 2024.04.14 23
280 LLM Mixture of Experts - Part 2 OBG 2024.04.14 23
279 LLM llama3 implemented from scratch OBG 2024.05.24 25
278 Graphic ASCII 3D 렌더러 만들기 OBG 2024.06.03 25
277 LLM 만능 프롬프트 OBG 2024.04.07 27
276 LLM Getting Started with Sentiment Analysis using Python OBG 2024.04.11 28
275 LLM The difference between quantization methods for the same bits OBG 2024.04.14 28
274 Deeplearning [ifkakao] 추천 시스템: 맥락과 취향 사이 줄타 OBG 2024.01.10 30
273 LLM Real-Time Stock News Sentiment Prediction with Python OBG 2024.04.11 30
272 Tool/etc HuggingFace 공동창업자가 추천하는 AI 분야 입문 서적 OBG 2024.05.24 32
271 LLM [12월 1주] 떠오르는 '미스트랄 7B'...'라마 2' 이어 한국어 모델 세대교체 주도 OBG 2024.03.05 34
270 Deeplearning Using Machine Learning to Predict Customers’ Next Purchase Day OBG 2024.02.27 40
269 서버 멀티-플레이어 게임 서버와 레이턴시 보상 테크닉 OBG 2024.01.16 43
268 Deeplearning 마이크로소프트가 공개한 무료 AI 코스들 OBG 2023.11.28 56
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 15 Next
/ 15
위로