mx-space / feature-log

Devlog, Changelog
0 stars 0 forks source link

2022.1 一月 新的开始 #6

Closed Innei closed 2 years ago

Innei commented 2 years ago

自定义 js、css 代码块已经支持了。

在主题配置文件中,进行如下配置。

image

就会有 live2d 了。

image

Innei commented 2 years ago

目前的完整的配置是这样的

name: kami

site:
  favicon: https://innei.ren/favicon.svg
  # 开屏图 svg 标签, 注意 XSS
  logo_svg: <svg height="200px" viewbox="0 0 200 200" version="1.1" shape-rendering="geometricPrecision"><g stroke="none" strokewidth="1" fill="none" fillrule="evenodd"><g id="forest" fill="currentColor" fillrule="nonzero"><path d="M116.799219,176.953125 C112.484375,176.953125 108.986719,180.450781 108.986719,184.765625 L108.986719,192.1875 C108.986719,196.502344 112.484375,200 116.799219,200 C121.114062,200 124.611719,196.502344 124.611719,192.1875 L124.611719,184.765625 C124.611719,180.450781 121.114063,176.953125 116.799219,176.953125 Z" id="Path"></path><path d="M121.456641,150.248047 C121.298828,150.158203 108.089453,142.472656 101.778125,128.767188 C106.058594,127.733594 109.462109,126.055078 112.442578,124.584766 C115.008203,123.319531 116.671094,120.749609 116.787109,117.891406 C116.903125,115.033203 115.441797,112.336328 112.986719,110.867578 C108.091406,107.937891 96.6117187,99.3179688 91.234375,88.9808594 C94.3324219,88.1222656 97.3414062,86.940625 100.255469,85.734375 C102.819922,84.6730469 104.628906,82.3304688 105.007422,79.5808594 C105.385938,76.83125 104.276953,74.0875 102.094531,72.3722656 C82.3632812,56.8691406 70.0417969,20.1820313 69.9210937,19.8171875 C68.8640625,16.6136719 65.8710938,14.4558594 62.5019531,14.4558594 C62.4839844,14.4558594 62.465625,14.4558594 62.4472656,14.4558594 C59.05625,14.4792969 56.0664063,16.690625 55.0484375,19.925 C54.934375,20.2878906 43.3839844,56.3890625 22.3355469,71.8246094 C20.075,73.4824219 18.8757813,76.2242188 19.1933594,79.0097656 C19.5109375,81.7949219 21.2964844,84.196875 23.8722656,85.303125 C26.1265625,86.2714844 29.5851563,87.7554688 34.3464844,89.0640625 C29.0214844,98.8472656 17.2527344,107.819922 12.2683594,110.952734 C9.7640625,112.517969 8.35625,115.360938 8.63007813,118.301563 C8.90390625,121.242188 10.8117188,123.776953 13.5617188,124.852734 C13.9058594,124.9875 14.2785156,125.1375 14.6828125,125.3 C16.8089844,126.154297 19.7445313,127.332031 23.6902344,128.501953 C17.2066406,141.350391 3.68632813,150.395703 3.53671875,150.494141 C1.09140625,152.094922 -0.25625,154.926563 0.044140625,157.833594 C0.34453125,160.740625 2.2421875,163.237109 4.96328125,164.303906 C5.76640625,164.61875 23.6132813,171.474609 55.471875,172.521875 L55.471875,192.1875 C55.471875,196.502344 58.9695313,200 63.284375,200 C67.5992187,200 71.096875,196.502344 71.096875,192.1875 L71.096875,172.544531 C103.353125,171.572656 119.956641,164.517578 120.696484,164.196094 C123.407422,163.016797 125.221094,160.408984 125.382422,157.457031 C125.542578,154.504688 124.023438,151.714844 121.456641,150.248047 Z M63.6742188,157.03125 C46.6414063,157.03125 33.3425781,155.194922 24.325,153.367578 C29.7734375,147.926953 35.75625,140.533203 39.3648438,131.730859 C44.5152344,132.389453 50.4929688,132.8125 57.4242188,132.8125 C61.7390625,132.8125 65.2367188,129.314844 65.2367188,125 C65.2367188,120.685156 61.7390625,117.1875 57.4242188,117.1875 C46.7472656,117.1875 38.8265625,116.116406 32.8878906,114.769531 C33.4640625,114.256641 34.0460937,113.726953 34.63125,113.180859 C42.2988281,106.020703 47.5574219,98.8085938 50.3394531,91.6605469 C51.3,91.7195313 52.2839844,91.7652344 53.2945313,91.7941406 C57.6179688,91.9210938 61.2035156,88.5207031 61.3269531,84.2082031 C61.45,79.8949219 58.0535156,76.2988281 53.740625,76.1757813 C49.2144531,76.0464844 45.3546875,75.5386719 42.0863281,74.8628906 C51.1160156,64.9648438 57.9273437,52.8929688 62.5585937,43.0527344 C67.1378906,52.8117188 73.746875,64.7949219 82.1886719,74.6710938 C81.9644531,74.6675781 81.74375,74.6566406 81.5277344,74.6382813 C79.1414062,74.4355469 76.7910156,75.3363281 75.1546875,77.0871094 C73.5183594,78.8375 72.7753906,81.2421875 73.1398437,83.6105469 C75.0921875,96.3007813 83.7679687,106.876563 91.5785156,114.065234 C89.2605469,114.0125 87.06875,114.98125 85.5433594,116.714844 C83.9519531,118.523438 83.2839844,120.964844 83.7328125,123.33125 C86.2589844,136.650391 93.8433594,146.823047 100.754297,153.641797 C92.2726562,155.367188 79.8890625,157.03125 63.6742188,157.03125 Z" id="Shape"></path><path d="M199.920703,162.187891 C199.623438,160.078516 198.473047,158.178125 196.74375,156.933203 C196.677734,156.885547 190.046094,152.078516 183.367188,144.459375 C178.680469,139.112891 175.16875,133.808203 172.869141,128.615234 C177.176953,127.299219 180.334766,125.896484 182.855078,124.776563 C183.779688,124.365625 184.578125,124.011328 185.239063,123.752344 C187.985938,122.677344 189.889453,120.144141 190.166016,117.207422 C190.442578,114.270703 189.037891,111.426172 186.539844,109.857031 C180.508203,106.06875 165.928516,94.9003906 160.170313,82.8882813 C165.975,81.6109375 170.135938,80.0996094 173.450781,78.6757813 C176.026953,77.5691406 177.8125,75.1675781 178.130078,72.3824219 C178.447656,69.596875 177.248438,66.8550781 174.987891,65.1972656 C150.69375,47.3816406 137.426172,5.89023438 137.296484,5.47773438 C136.282422,2.23945312 133.294141,0.02578125 129.900781,0 C129.880469,0 129.860938,0 129.840625,0 C126.471875,0 123.479297,2.1609375 122.422266,5.36484375 C122.345703,5.59726563 114.594141,28.8386719 101.137891,48.2902344 C98.6832031,51.8386719 99.5699219,56.7050781 103.118359,59.1597656 C106.666016,61.6144531 111.532813,60.7277344 113.987891,57.1796875 C120.606641,47.6113281 125.908984,37.3730469 129.771094,28.9074219 C135.158203,40.7210938 143.499219,55.9507812 154.835547,68.0292969 C148.182031,69.3046875 138.466406,70.365625 124.221094,70.365625 C119.90625,70.365625 116.408594,73.8632812 116.408594,78.178125 C116.408594,82.4929687 119.90625,85.990625 124.221094,85.990625 C131.989844,85.990625 138.586719,85.7003906 144.237891,85.2101562 C147.194141,93.6328125 153.265625,102.16875 162.363672,110.664453 C163.722266,111.933203 165.067578,113.123437 166.365234,114.225781 C160.423047,115.830469 152.078516,117.127344 139.455469,117.127344 C135.140625,117.127344 131.642969,120.625 131.642969,124.939844 C131.642969,129.254687 135.140625,132.752344 139.455469,132.752344 C146.397656,132.752344 152.275391,132.379297 157.298828,131.778516 C160.196094,139.490625 164.986719,147.194531 171.617578,154.758984 C173.749219,157.191406 175.869141,159.373437 177.836328,161.269531 C171.480469,162.880469 160.966797,164.453125 144.142969,164.453125 C139.828125,164.453125 136.330469,167.950781 136.330469,172.265625 L136.330469,192.1875 C136.330469,196.502344 139.828125,200 144.142969,200 C148.457813,200 151.955469,196.502344 151.955469,192.1875 L151.955469,179.966016 C166.112109,179.546484 177.524219,177.948828 185.952344,175.201562 C193.906641,172.608203 197.119922,169.648438 198.327734,168.114453 C199.645703,166.441016 200.217969,164.297266 199.920703,162.187891 Z" id="Path"></path></g></g></svg>
  # 随机图片
  figure:
    - https://cdn.jsdelivr.net/gh/Innei/fancy@master/2021/qsNmnC2zHB5FW41.jpg
    - https://cdn.jsdelivr.net/gh/Innei/fancy@master/2021/GwJzq4SYtClRcZh.jpg
    - https://cdn.jsdelivr.net/gh/Innei/fancy@master/2021/6nOYcygRGXvpsFd.jpg
    - https://cdn.jsdelivr.net/gh/Innei/fancy@master/2021/Qr2ykmsEFpJn4BC.jpg
    - https://cdn.jsdelivr.net/gh/Innei/fancy@master/2021/KiOuTlCzge7JHh3.jpg
    - https://cdn.jsdelivr.net/gh/Innei/fancy@master/2021/sM2XCJTW8BdUe5i.jpg
    - https://cdn.jsdelivr.net/gh/Innei/fancy@master/2021/18KQYP9fNGbrzJu.jpg
    - https://cdn.jsdelivr.net/gh/Innei/fancy@master/2021/rdjZo6Sg2JReyiA.jpg
    - https://cdn.jsdelivr.net/gh/Innei/fancy@master/2021/X2MVRDe1tyJil3O.jpg
    - https://cdn.jsdelivr.net/gh/Innei/fancy@master/2021/EDoKvz5p7BXZ46U.jpg
    - https://cdn.jsdelivr.net/gh/Innei/fancy@master/2021/EGk4qUvcXDygV2z.jpg
    - https://cdn.jsdelivr.net/gh/Innei/fancy@master/2021/5QdwFC82gT3XPSZ.jpg
    - https://cdn.jsdelivr.net/gh/Innei/fancy@master/2021/KPyTCARHBzpxJ46.jpg
    - https://cdn.jsdelivr.net/gh/Innei/fancy@master/2021/7TOEIPwGrZB1qFb.jpg
    - https://cdn.jsdelivr.net/gh/Innei/fancy@master/2021/Ihj5QAZgVMqr9fJ.jpg
    - https://cdn.jsdelivr.net/gh/Innei/fancy@master/2021/KZ6jv8C92Vpwcih.jpg

  background:
    src:
      light: https://gitee.com/xun7788/my-imagination/raw/master/cdn/background.png
      dark: https://gitee.com/xun7788/my-imagination/raw/master/cdn/background-night.png
    position: top center fixed

  header:
    menu:
      - title: 源
        path: /
        type: Home
        icon: faDotCircle
        subMenu: []
      - title: 文
        path: /posts
        type: Post
        subMenu: []
        icon: faGlasses
      - title: 记
        type: Note
        path: /notes
        icon: faFeatherAlt
      - title: 言
        path: /says
        icon: faComments
      - title: 览
        icon: faHistory
        path: /timeline
        subMenu:
          - title: 生活
            icon: faFeatherAlt
            path: /timeline?type=note
          - title: 博文
            icon: faBookOpen
            path: /timeline?type=post
          - title: 回忆
            icon: faCircle
            path: /timeline?memory=1
      - title: 友
        icon: faUserFriends
        path: /friends
      - title: 诉
        icon: faComment
        path: /recently
      - title: 余
        icon: faCircleNotch
        path: /favorite/music
        subMenu:
          - title: 听歌
            icon: faMusic
            type: Music
            path: /favorite/music
      - title: ''
        icon: faSubway
        path: 'https://travellings.link'
  social:
    - url: 'https://github.com/Innei'
      title: GitHub
      icon: faGithub
      color: var(--black)
    - url: 'https://jq.qq.com/?_wv=1027&k=5t9N0mw'
      title: QQ
      icon: faQq
      color: '#12b7f5'
    - url: 'https://twitter.com/__oQuery'
      title: twitter
      icon: faTwitter
      color: '#02A4ED'

  footer:
    background:
      src:
        dark: |-
        light: https://gitee.com/xun7788/my-imagination/raw/master/cdn/footer.png
      position: top/cover
    home_page: https://innei.ren
    motto:
      content: Stay hungry. Stay foolish.
      author: Steve Jobs
    icp:
      enable: true
      label: '浙ICP备 20028356 号'
      link: http://beian.miit.gov.cn/

    navigation:
      - name: 关于
        path: '/about'
      - name: 留言
        path: '/message'
      - name: 友链
        path: '/friends'
      - name: RSS 订阅
        path: '/feed'
        newtab: true
      - name: 站点地图
        path: '/sitemap'
        newtab: true
      - name: 开往
        path: https://travellings.link/
        newtab: true

  custom:
    script: |-
      console.log('Hello')
    style: |-
      .foo {
        color: red
      }
    js:
      - https://cdn.jsdelivr.net/gh/stevenjoezhang/live2d-widget@latest/autoload.js
    css:
      - https://cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css

function:
  player:
    # 默认播放列表
    # 只支持网易云
    id:
      - 563534789
      - 1447327083
      - 1450252250
  analyze:
    enable: true
    ga: G-X4PVVRB6TF

  donate:
    enable: true
    link: https://afdian.net/@Innei
Innei commented 2 years ago
info  - Collecting page data  
Page                                       Size     First Load JS
┌ λ /                                      5.17 kB         311 kB
├   └ css/653a178efa4724c9.css             950 B
├   /_app                                  0 B             304 kB
├ λ /[page]                                1.06 kB         329 kB
├   └ css/0675faafb467c2b9.css             1.66 kB
├ λ /404                                   692 B           305 kB
├ λ /api/bilibili/bangumi                  0 B             304 kB
├ λ /api/bilibili/cover                    0 B             304 kB
├ λ /api/bilibili/video                    0 B             304 kB
├ λ /api/feed                              0 B             304 kB
├ λ /api/netease/music                     0 B             304 kB
├ λ /api/netease/song                      0 B             304 kB
├ λ /api/sitemap                           0 B             304 kB
├ λ /category/[slug]                       7.89 kB         316 kB
├ λ /dev/zoom                              365 B           304 kB
├ λ /favorite/bangumi                      1.87 kB         310 kB
├ λ /favorite/music                        2.14 kB         310 kB
├   └ css/faba63f7732fd70f.css             573 B
├ λ /friends                               9.94 kB         326 kB
├   └ css/28a312a38641b4e6.css             489 B
├ λ /login                                 2 kB            306 kB
├   └ css/8cba0370ecaeebe2.css             521 B
├ λ /notes/[id]                            5.47 kB         333 kB
├   └ css/d8e0a9b1015a3d50.css             1.93 kB
├ λ /posts                                 6.94 kB         315 kB
├   └ css/e7a1dce72d581d85.css             755 B
├ λ /posts/[category]/[slug]               3.76 kB         332 kB
├   └ css/460cb4c7f44c400f.css             1.74 kB
├ λ /projects                              1.99 kB         310 kB
├ λ /projects/[id]                         2.29 kB         310 kB
├ λ /recently                              3.46 kB         307 kB
├   └ css/36c2d720f9b8ac99.css             636 B
├ λ /says                                  18.4 kB         326 kB
├   └ css/3d0401d6d411fe80.css             369 B
└ λ /timeline                              8.57 kB         316 kB
    └ css/711ec0198f2688fe.css             395 B
+ First Load JS shared by all              304 kB
  ├ chunks/framework-774fc966c0f2820d.js   42.2 kB
  ├ chunks/main-4dbd8084f1abd7f8.js        32.6 kB
  ├ chunks/pages/_app-e73bc29159e27c50.js  227 kB
  ├ chunks/webpack-a3fd8ab904e44f8c.js     1.77 kB
  └ css/b85e767cb9b1e73f.css               18.4 kB

我发现 next 根本没做对每个页的优化,把所有 lib 都打进 _app 了。。。

Innei commented 2 years ago

然后不知道怎么就更新了这个样式,明明我都不用这个

image

Innei commented 2 years ago
info  - Collecting page data  
Page                                       Size     First Load JS
┌ λ /                                      5.17 kB         311 kB
├   └ css/653a178efa4724c9.css             950 B
├   /_app                                  0 B             304 kB
├ λ /[page]                                1.06 kB         329 kB
├   └ css/0675faafb467c2b9.css             1.66 kB
├ λ /404                                   692 B           305 kB
├ λ /api/bilibili/bangumi                  0 B             304 kB
├ λ /api/bilibili/cover                    0 B             304 kB
├ λ /api/bilibili/video                    0 B             304 kB
├ λ /api/feed                              0 B             304 kB
├ λ /api/netease/music                     0 B             304 kB
├ λ /api/netease/song                      0 B             304 kB
├ λ /api/sitemap                           0 B             304 kB
├ λ /category/[slug]                       7.89 kB         316 kB
├ λ /dev/zoom                              365 B           304 kB
├ λ /favorite/bangumi                      1.87 kB         310 kB
├ λ /favorite/music                        2.14 kB         310 kB
├   └ css/faba63f7732fd70f.css             573 B
├ λ /friends                               9.94 kB         326 kB
├   └ css/28a312a38641b4e6.css             489 B
├ λ /login                                 2 kB            306 kB
├   └ css/8cba0370ecaeebe2.css             521 B
├ λ /notes/[id]                            5.47 kB         333 kB
├   └ css/d8e0a9b1015a3d50.css             1.93 kB
├ λ /posts                                 6.94 kB         315 kB
├   └ css/e7a1dce72d581d85.css             755 B
├ λ /posts/[category]/[slug]               3.76 kB         332 kB
├   └ css/460cb4c7f44c400f.css             1.74 kB
├ λ /projects                              1.99 kB         310 kB
├ λ /projects/[id]                         2.29 kB         310 kB
├ λ /recently                              3.46 kB         307 kB
├   └ css/36c2d720f9b8ac99.css             636 B
├ λ /says                                  18.4 kB         326 kB
├   └ css/3d0401d6d411fe80.css             369 B
└ λ /timeline                              8.57 kB         316 kB
    └ css/711ec0198f2688fe.css             395 B
+ First Load JS shared by all              304 kB
  ├ chunks/framework-774fc966c0f2820d.js   42.2 kB
  ├ chunks/main-4dbd8084f1abd7f8.js        32.6 kB
  ├ chunks/pages/_app-e73bc29159e27c50.js  227 kB
  ├ chunks/webpack-a3fd8ab904e44f8c.js     1.77 kB
  └ css/b85e767cb9b1e73f.css               18.4 kB

我发现 next 根本没做对每个页的优化,把所有 lib 都打进 _app 了。。。


info  - Collecting page data  
Page                                       Size     First Load JS
┌ λ /                                      5.16 kB         273 kB
├   └ css/e808b56ce1c2c999.css             937 B
├   /_app                                  0 B             268 kB
├ λ /[page]                                1.45 kB         290 kB
├   └ css/ad6f00eb57e18df6.css             1.63 kB
├ λ /404                                   786 B           269 kB
├ λ /api/bilibili/bangumi                  0 B             268 kB
├ λ /api/bilibili/cover                    0 B             268 kB
├ λ /api/bilibili/video                    0 B             268 kB
├ λ /api/feed                              0 B             268 kB
├ λ /api/netease/music                     0 B             268 kB
├ λ /api/netease/song                      0 B             268 kB
├ λ /api/sitemap                           0 B             268 kB
├ λ /category/[slug]                       7.72 kB         276 kB
├ λ /dev/md                                2.39 kB         271 kB
├ λ /dev/mobx                              612 B           269 kB
├ λ /dev/req                               728 B           269 kB
├ λ /favorite/bangumi                      1.17 kB         269 kB
├ λ /favorite/dev/zoom                     372 B           269 kB
├ λ /favorite/music                        1.45 kB         270 kB
├   └ css/388443d7deacd979.css             568 B
├ λ /friends                               9.93 kB         286 kB
├   └ css/3d0f8ab3ae5a8b88.css             488 B
├ λ /login                                 1.98 kB         270 kB
├   └ css/fd4af9b00af299d0.css             519 B
├ λ /notes/[id]                            5.54 kB         294 kB
├   └ css/45c50ff22ce831fc.css             2.01 kB
├ λ /posts                                 6.69 kB         275 kB
├   └ css/17180f235187138d.css             739 B
├ λ /posts/[category]/[slug]               3.96 kB         292 kB
├   └ css/ddb3fc710e4cce08.css             1.85 kB
├ λ /projects                              1.26 kB         269 kB
├ λ /projects/[id]                         1.6 kB          270 kB
├ λ /recently                              3.4 kB          272 kB
├   └ css/247fac99b09aed42.css             1.17 kB
├ λ /says                                  17.9 kB         286 kB
├   └ css/3c6d9a4149eba5e6.css             332 B
└ λ /timeline                              8.32 kB         276 kB
    └ css/711ec0198f2688fe.css             395 B
+ First Load JS shared by all              268 kB
  ├ chunks/framework-774fc966c0f2820d.js   42.2 kB
  ├ chunks/main-4dbd8084f1abd7f8.js        32.6 kB
  ├ chunks/pages/_app-d22cb9008ea85ebc.js  192 kB
  ├ chunks/webpack-f9687959fef3d2c8.js     1.76 kB
  └ css/80d22d82e9b14082.css               14.6 kB

首次加载 缩小了 20K 体积

Innei commented 2 years ago

踩坑:为什么在 devtool 开启了 disable cache ,会导致了背景图频繁重载?

用 JS 控制 CSS 动态背景,用 CSS var 的形式如下

const FooterContainer = observer((props) => {
  const kamiConfig = useThemeConfig()
  const { colorMode } = appUIStore
  const background = kamiConfig.site.footer.background
  return (
    <footer
      className={styles['footer']}
      style={useMemo(
        () =>
          ({
            '--bg':
              colorMode == 'dark'
                ? `url(${background.src.dark || background.src.light}) ${         //   <------------- 动态控制
                    background.position
                  }`
                : `url(${background.src.light || background.src.dark}) ${
                    background.position
                  }`,
          } as any),
        [
          background.position,
          background.src.dark,
          background.src.light,
          colorMode,
        ],
      )}
    >
      {props.children}
    </footer>
  )
})

上面情况,即使此组件没有发生 re-render,也有可能造成 CSS background 的重载。正确的写法,直接附加 style。

第二种:


export const useThemeBackground = () => {
  const {
    appStore: { colorMode },
  } = useStore()
  const {
    site: { background },
  } = useKamiConfig()
  useEffect(() => {
    const $body = document.body
    $body.style.background = `var(--light-bg) url(${background.src[colorMode]}) ${background.position}`
  }, [background.position, background.src, colorMode])
}

用 $style 或者是 直接附到 body.style.background 一样会重载。但是吧 background 的第一次属性 color 抽离不写,就不会重载了。。。如:

export const useThemeBackground = () => {
  const {
    appStore: { colorMode },
  } = useStore()
  const {
    site: { background },
  } = useKamiConfig()
  useEffect(() => {
    const remove = loadStyle(
      `body { background: url(${
        background.src[colorMode] || background.src.light || background.src.dark
      }) ${background.position}; background-color: var(--light-bg);  }`,  // <---------------
    )

    return remove
  }, [background.position, background.src, colorMode])
}

以上重载均不是 react re-render 导致。

Innei commented 2 years ago

现在支持自定义邮件评论回复模板

0B4142F2-F983-4306-A0FF-23298B5826D6

Innei commented 2 years ago

几个破页面为什么这么难维护。

     271 text files.
     271 unique files.                                          
      31 files ignored.

github.com/AlDanial/cloc v 1.90  T=0.29 s (836.4 files/s, 97852.6 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
TypeScript                     175           1119            615          11177
YAML                             6           1240             15           8322
CSS                             44            872             57           4348
JavaScript                       9             18             18            181
Markdown                         2             38              0             99
Bourne Shell                     5              8             10             57
-------------------------------------------------------------------------------
SUM:                           241           3295            715          24184
-------------------------------------------------------------------------------
Innei commented 2 years ago

现已加入高并发豪华午餐。

12 进程,MacBook Pro 16-inch 2019

at 17:05:28 ❯ ab -n 10000 -c 100 http://127.0.0.1:2333/api/v2/aggregate
This is ApacheBench, Version 2.3 <$Revision: 1879490 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Completed 10000 requests
Finished 10000 requests

Server Software:
Server Hostname:        127.0.0.1
Server Port:            2333

Document Path:          /api/v2/aggregate
Document Length:        1918 bytes

Concurrency Level:      100
Time taken for tests:   2.590 seconds
Complete requests:      10000
Failed requests:        0
Total transferred:      21610000 bytes
HTML transferred:       19180000 bytes
Requests per second:    3861.67 [#/sec] (mean)
Time per request:       25.896 [ms] (mean)
Time per request:       0.259 [ms] (mean, across all concurrent requests)
Transfer rate:          8149.48 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    1   2.0      1      92
Processing:     2   24  12.2     24     135
Waiting:        1   23  12.2     23     134
Total:          5   26  11.8     25     135

Percentage of the requests served within a certain time (ms)
  50%     25
  66%     27
  75%     28
  80%     29
  90%     34
  95%     38
  98%     50
  99%    100
 100%    135 (longest request)

同配置单进程:

at 17:07:22 ❯ ab -n 10000 -c 100 http://127.0.0.1:2333/api/v2/aggregate
This is ApacheBench, Version 2.3 <$Revision: 1879490 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Completed 10000 requests
Finished 10000 requests

Server Software:
Server Hostname:        127.0.0.1
Server Port:            2333

Document Path:          /api/v2/aggregate
Document Length:        1918 bytes

Concurrency Level:      100
Time taken for tests:   3.323 seconds
Complete requests:      10000
Failed requests:        0
Total transferred:      21610000 bytes
HTML transferred:       19180000 bytes
Requests per second:    3009.33 [#/sec] (mean)
Time per request:       33.230 [ms] (mean)
Time per request:       0.332 [ms] (mean, across all concurrent requests)
Transfer rate:          6350.75 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    1   0.5      1       5
Processing:     7   32  16.3     26     163
Waiting:        6   21  14.0     18     155
Total:          8   33  16.3     27     164

Percentage of the requests served within a certain time (ms)
  50%     27
  66%     32
  75%     35
  80%     39
  90%     45
  95%     50
  98%     86
  99%    153
 100%    164 (longest request)

在 10000 请求 100 并发下,大概有 20% 提升。

Innei commented 2 years ago

新·项目管理 & 项目页

image image image

Innei commented 2 years ago

new project design.

image

Innei commented 2 years ago

全部移除 rc-anime

Innei commented 2 years ago

明天就过年了。

在这今年的最后。

新的 Feat 来啦。

  1. 手动更新 Markdown 图片的信息 image

  2. 前端 朋友们页面 新设计 image

  3. 生态 - Raycast reader

https://github.com/Innei/raycast-extensions/tree/master/extensions/mx-space-reader