Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
odygrd committed Sep 22, 2024
1 parent 9c32a33 commit 79acae4
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 15 deletions.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ The tables are sorted by the 95th percentile
| [MS BinLog](http://github.com/Morgan-Stanley/binlog) | 21 | 21 | 22 | 22 | 56 | 93 |
| [XTR](https://github.com/choll/xtr) | 7 | 7 | 29 | 30 | 33 | 53 |
| [Reckless](http://github.com/mattiasflodin/reckless) | 26 | 28 | 31 | 32 | 35 | 49 |
| [BqLog](https://github.com/Tencent/BqLog) | 29 | 29 | 30 | 49 | 56 | 71 |
| [Iyengar NanoLog](http://github.com/Iyengar111/NanoLog) | 83 | 96 | 117 | 125 | 152 | 197 |
| [spdlog](http://github.com/gabime/spdlog) | 143 | 147 | 152 | 158 | 165 | 177 |
| [g3log](http://github.com/KjellKod/g3log) | 1161 | 1259 | 1329 | 1419 | 1602 | 1827 |
Expand All @@ -202,6 +203,7 @@ The tables are sorted by the 95th percentile
| [PlatformLab NanoLog](http://github.com/PlatformLab/NanoLog) | 15 | 17 | 20 | 23 | 27 | 32 |
| [MS BinLog](http://github.com/Morgan-Stanley/binlog) | 21 | 22 | 22 | 23 | 62 | 100 |
| [Reckless](http://github.com/mattiasflodin/reckless) | 19 | 23 | 26 | 28 | 34 | 55 |
| [BqLog](https://github.com/Tencent/BqLog) | 31 | 33 | 34 | 55 | 61 | 73 |
| [Iyengar NanoLog](http://github.com/Iyengar111/NanoLog) | 58 | 90 | 123 | 131 | 168 | 242 |
| [spdlog](http://github.com/gabime/spdlog) | 210 | 243 | 288 | 313 | 382 | 694 |
| [g3log](http://github.com/KjellKod/g3log) | 1271 | 1337 | 1396 | 1437 | 1614 | 1899 |
Expand All @@ -224,6 +226,7 @@ Logging `std::string` over 35 characters to prevent the short string optimizatio
| [MS BinLog](http://github.com/Morgan-Stanley/binlog) | 22 | 23 | 24 | 25 | 61 | 100 |
| [PlatformLab NanoLog](http://github.com/PlatformLab/NanoLog) | 15 | 17 | 21 | 27 | 33 | 39 |
| [XTR](https://github.com/choll/xtr) | 8 | 9 | 29 | 31 | 35 | 54 |
| [BqLog](https://github.com/Tencent/BqLog) | 29 | 30 | 31 | 51 | 60 | 71 |
| [Reckless](http://github.com/mattiasflodin/reckless) | 91 | 107 | 115 | 118 | 124 | 135 |
| [Iyengar NanoLog](http://github.com/Iyengar111/NanoLog) | 86 | 97 | 119 | 128 | 159 | 268 |
| [spdlog](http://github.com/gabime/spdlog) | 120 | 124 | 128 | 132 | 141 | 151 |
Expand All @@ -241,6 +244,7 @@ Logging `std::string` over 35 characters to prevent the short string optimizatio
| [Quill Unbounded Queue](http://github.com/odygrd/quill) | 15 | 16 | 17 | 18 | 19 | 21 |
| [MS BinLog](http://github.com/Morgan-Stanley/binlog) | 23 | 25 | 27 | 28 | 65 | 105 |
| [PlatformLab NanoLog](http://github.com/PlatformLab/NanoLog) | 16 | 20 | 32 | 38 | 44 | 51 |
| [BqLog](https://github.com/Tencent/BqLog) | 32 | 33 | 35 | 56 | 64 | 76 |
| [Reckless](http://github.com/mattiasflodin/reckless) | 79 | 94 | 104 | 107 | 114 | 132 |
| [Iyengar NanoLog](http://github.com/Iyengar111/NanoLog) | 85 | 93 | 125 | 133 | 168 | 237 |
| [spdlog](http://github.com/gabime/spdlog) | 178 | 218 | 261 | 281 | 381 | 651 |
Expand All @@ -252,6 +256,8 @@ Logging `std::string` over 35 characters to prevent the short string optimizatio

Logging `std::vector<std::string>` containing 16 large strings, each ranging from 50 to 60 characters.

Note: some of the previous loggers do not support passing a `std::vector` as an argument.

`LOG_INFO(logger, "Logging int: {}, int: {}, vector: {}", i, j, v)`.

##### 1 Thread Logging
Expand Down Expand Up @@ -304,7 +310,11 @@ flush-and-wait mechanism.
Note that `MS BinLog` writes log data to a binary file, which requires offline formatting with an additional
program—this makes it an unfair comparison, but it is included for reference.

Similarly, `Platformlab Nanolog` also outputs binary logs and is expected to deliver high throughput. However, for
Similarly, `BqLog (binary log)` uses the compressed binary log appender, and its log files are not human-readable unless
processed offline. However, it is included for reference. The other version of `BqLog` is using a text appender and
produces human-readable log files.

In the same way, `Platformlab Nanolog` also outputs binary logs and is expected to deliver high throughput. However, for
reasons unexplained, the benchmark runs significantly slower (10x longer) than the other libraries, so it is excluded
from the table.

Expand All @@ -313,7 +323,9 @@ Logging 4 million times the message `"Iteration: {} int: {} double: {}"`
| Library | million msg/second | elapsed time |
|-------------------------------------------------------------------|:------------------:|:------------:|
| [MS BinLog (binary log)](http://github.com/Morgan-Stanley/binlog) | 63.80 | 62 ms |
| [BqLog (binary log)](https://github.com/Tencent/BqLog) | 15.92 | 251 ms |
| [Quill](http://github.com/odygrd/quill) | 5.70 | 701 ms |
| [BqLog](https://github.com/Tencent/BqLog) | 4.93 | 811 ms |
| [spdlog](http://github.com/gabime/spdlog) | 3.54 | 1128 ms |
| [fmtlog](http://github.com/MengRao/fmtlog) | 2.90 | 1378 ms |
| [Reckless](http://github.com/mattiasflodin/reckless) | 2.72 | 1471 ms |
Expand Down
Binary file modified docs/charts/large_strings_1_thread_logging.webp
Binary file not shown.
Binary file modified docs/charts/large_strings_4_thread_logging.webp
Binary file not shown.
Binary file modified docs/charts/numbers_1_thread_logging.webp
Binary file not shown.
Binary file modified docs/charts/numbers_4_thread_logging.webp
Binary file not shown.
Binary file modified docs/charts/throughput_chart.webp
Binary file not shown.
37 changes: 24 additions & 13 deletions scripts/generate_latency_chart_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ def generate_chart_url(markdown_table, title):
'Reckless': 'rgba(255,99,71,0.6)', # Tomato Red
'Iyengar NanoLog': 'rgba(100,149,237,0.6)', # Cornflower Blue
'spdlog': 'rgba(0,128,128,0.6)', # Teal
'g3log': 'rgba(255,165,0,0.6)' # Orange Red
'g3log': 'rgba(255,165,0,0.6)', # Orange Red
'BqLog': 'rgba(75,0,130,0.6)' # Indigo
}

# Parse the markdown table
Expand Down Expand Up @@ -89,22 +90,32 @@ def generate_chart_url(markdown_table, title):
"""
| Library | 50th | 75th | 90th | 95th | 99th | 99.9th |
|----------------------------------------------------------------|:----:|:----:|:----:|:----:|:----:|:------:|
| [Quill Bounded Dropping Queue](http://github.com/odygrd/quill) | 48 | 50 | 53 | 55 | 58 | 62 |
| [Quill Unbounded Queue](http://github.com/odygrd/quill) | 54 | 56 | 57 | 58 | 61 | 66 |
| [MS BinLog](http://github.com/Morgan-Stanley/binlog) | 68 | 69 | 72 | 74 | 79 | 281 |
| [XTR](https://github.com/choll/xtr) | 284 | 294 | 340 | 346 | 356 | 575 |
| [fmtlog](http://github.com/MengRao/fmtlog) | 711 | 730 | 754 | 770 | 804 | 834 |
| [spdlog](http://github.com/gabime/spdlog) | 6191 | 6261 | 6330 | 6386 | 6633 | 7320 |
| [Quill Bounded Dropping Queue](http://github.com/odygrd/quill) | 11 | 13 | 13 | 14 | 15 | 16 |
| [fmtlog](http://github.com/MengRao/fmtlog) | 11 | 12 | 13 | 14 | 15 | 17 |
| [Quill Unbounded Queue](http://github.com/odygrd/quill) | 14 | 15 | 16 | 17 | 18 | 19 |
| [MS BinLog](http://github.com/Morgan-Stanley/binlog) | 22 | 23 | 24 | 25 | 61 | 100 |
| [PlatformLab NanoLog](http://github.com/PlatformLab/NanoLog) | 15 | 17 | 21 | 27 | 33 | 39 |
| [XTR](https://github.com/choll/xtr) | 8 | 9 | 29 | 31 | 35 | 54 |
| [BqLog](https://github.com/Tencent/BqLog) | 29 | 30 | 31 | 51 | 60 | 71 |
| [Reckless](http://github.com/mattiasflodin/reckless) | 91 | 107 | 115 | 118 | 124 | 135 |
| [Iyengar NanoLog](http://github.com/Iyengar111/NanoLog) | 86 | 97 | 119 | 128 | 159 | 268 |
| [spdlog](http://github.com/gabime/spdlog) | 120 | 124 | 128 | 132 | 141 | 151 |
| [g3log](http://github.com/KjellKod/g3log) | 881 | 956 | 1018 | 1089 | 1264 | 1494 |
""",
"""
| Library | 50th | 75th | 90th | 95th | 99th | 99.9th |
|----------------------------------------------------------------|:----:|:----:|:----:|:----:|:----:|:------:|
| [Quill Bounded Dropping Queue](http://github.com/odygrd/quill) | 50 | 52 | 54 | 56 | 60 | 82 |
| [MS BinLog](http://github.com/Morgan-Stanley/binlog) | 70 | 72 | 75 | 79 | 88 | 286 |
| [Quill Unbounded Queue](http://github.com/odygrd/quill) | 97 | 107 | 116 | 122 | 135 | 148 |
| [XTR](https://github.com/choll/xtr) | 512 | 711 | 761 | 791 | 865 | 945 |
| [fmtlog](http://github.com/MengRao/fmtlog) | 780 | 804 | 823 | 835 | 860 | 896 |
| [spdlog](http://github.com/gabime/spdlog) | 6469 | 6549 | 6641 | 6735 | 7631 | 9430 |
| [XTR](https://github.com/choll/xtr) | 9 | 11 | 13 | 14 | 32 | 40 |
| [fmtlog](http://github.com/MengRao/fmtlog) | 11 | 12 | 13 | 14 | 16 | 19 |
| [Quill Bounded Dropping Queue](http://github.com/odygrd/quill) | 13 | 14 | 15 | 16 | 17 | 19 |
| [Quill Unbounded Queue](http://github.com/odygrd/quill) | 15 | 16 | 17 | 18 | 19 | 21 |
| [MS BinLog](http://github.com/Morgan-Stanley/binlog) | 23 | 25 | 27 | 28 | 65 | 105 |
| [PlatformLab NanoLog](http://github.com/PlatformLab/NanoLog) | 16 | 20 | 32 | 38 | 44 | 51 |
| [BqLog](https://github.com/Tencent/BqLog) | 32 | 33 | 35 | 56 | 64 | 76 |
| [Reckless](http://github.com/mattiasflodin/reckless) | 79 | 94 | 104 | 107 | 114 | 132 |
| [Iyengar NanoLog](http://github.com/Iyengar111/NanoLog) | 85 | 93 | 125 | 133 | 168 | 237 |
| [spdlog](http://github.com/gabime/spdlog) | 178 | 218 | 261 | 281 | 381 | 651 |
| [g3log](http://github.com/KjellKod/g3log) | 992 | 1055 | 1121 | 1178 | 1360 | 1600 |
"""
]

Expand Down
4 changes: 3 additions & 1 deletion scripts/generate_throughput_chart_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ def generate_chart_url(markdown_table, title):
'fmtlog': 'rgba(255,99,132,0.6)', # Light Red
'spdlog': 'rgba(0,128,128,0.6)', # Teal
'Reckless': 'rgba(255,99,71,0.6)', # Tomato Red
'XTR': 'rgba(255,206,86,0.6)' # Yellow
'XTR': 'rgba(255,206,86,0.6)', # Yellow
'BqLog': 'rgba(75,0,130,0.6)' # Indigo
}

# Parse the markdown table
Expand Down Expand Up @@ -81,6 +82,7 @@ def generate_chart_url(markdown_table, title):
| Library | million msg/second | elapsed time |
|-------------------------------------------------------------------|:------------------:|:------------:|
| [Quill](http://github.com/odygrd/quill) | 5.70 | 701 ms |
| [BqLog](https://github.com/Tencent/BqLog) | 4.93 | 811 ms |
| [spdlog](http://github.com/gabime/spdlog) | 3.54 | 1128 ms |
| [fmtlog](http://github.com/MengRao/fmtlog) | 2.90 | 1378 ms |
| [Reckless](http://github.com/mattiasflodin/reckless) | 2.72 | 1471 ms |
Expand Down

0 comments on commit 79acae4

Please sign in to comment.