1. <strong id="7actg"></strong>
    2. <table id="7actg"></table>

    3. <address id="7actg"></address>
      <address id="7actg"></address>
      1. <object id="7actg"><tt id="7actg"></tt></object>

        gos-log日志檢索系統(tǒng)

        聯(lián)合創(chuàng)作 · 2023-09-27 04:49

        gos-log 基于Go語言的輕量級高性能的大日志檢索系統(tǒng)

        開源地址

        gos-log

        https://gitee.com/dianjiu/gos-log

        https://github.com/dianjiu/gos-log

        gos-log-vue

        https://gitee.com/dianjiu/gos-log-vue

        https://github.com/dianjiu/gos-log-vue

        演示地址

        http://goslog.dianjiu.org.cn

        賬號:admin
        密碼:admin

        演示截圖

        登陸頁

        image

         

        客戶端

        image

         

        項目管理

        image

         

        日志查找

        image

         

        項目構(gòu)建

        gos-log

        # 進入go工作空間
        cd ~/codes/go/src
        # 配置go國內(nèi)代理
        sudo vim ~/.bash_profile
        # 新增如下內(nèi)容 
        export GOPATH=/Users/dianjiu/Codes/go
        export GOROOT=/usr/local/go
        export GOBIN=$GOPATH/bin
        export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
        export GOPROXY=https://goproxy.cn
        export GO111MODULE=on
        # 使配置生效
        source ~/.bash_profile
        # 安裝beego依賴
        go get github.com/astaxie/beego
        go get github.com/beego/bee
        # 克隆項目
        git clone https://github.com/dianjiu/gos-log.git
        # 分別進入項目目錄
        cd gos-log/logs     #進入服務端
        cd gos-log/logc     #進入客戶端
        # 啟動服務
        bee run

         

        gos-log-vue

        # 克隆項目
        git clone https://github.com/dianjiu/gos-log-vue.git
        
        # 進入項目目錄
        cd gos-log-vue
        
        # 安裝依賴
        yarn install
        
        # 啟動服務
        yarn run dev

         

        項目部署

        gos-log

        # 打包服務端
        cd gos-log/logs
        bee pack -be GOOS=linux
        # 打包客戶端
        cd gos-log/logc
        bee pack -be GOOS=linux
        # 準備數(shù)據(jù)庫 見gos-log項目下的sql文件夾

         

        gos-log-logs

        # 解壓縮
        tar -zxf logs.tar.gz -C ./ 
        # 授權(quán)
        chmod 777 logs 
        # 修改數(shù)據(jù)庫配置
        sudo vim conf/app.conf 
        # 啟動
        nohup ./logs >> logs.log &

         

        gos-log-logc

        # 解壓縮
        tar -zxf logc.tar.gz -C ./ 
        # 授權(quán)
        chmod 777 logc 
        # 啟動
        nohup ./logc >> logc.log &

         

        gos-log-vue

        # 打包構(gòu)建
        yarn run build
        # 把dist目錄下的文件拿到服務器部署即可
        # nginx部署如下nginx.conf
        server {
            listen       2022;
            server_name  localhost;
        
            location / {
                root /web/gos-log/vue;
                index  index.html index.htm;
                try_files $uri $uri/ /index.html; 
            }
            location /api {
                rewrite  ^/api/(.*)$ /$1 break;
                proxy_pass http://127.0.0.1:2021;
            }
        }

        性能測試

        系統(tǒng)硬件

        CPU Intel? Core? i5-10210U CPU @ 1.60GHz × 8
        內(nèi)存 16G
        硬盤 512.1 GB
        操作系統(tǒng) Ubuntu 20.04.2 LTS 64位
        GNOME版本 3.36.8

        系統(tǒng)環(huán)境

        Java環(huán)境 ORACLE JDK13.0.2
        Go環(huán)境 GO1.15.7 linux/amd64
        Python環(huán)境 Python 3.8.5

        性能對比

        單文件逐行讀取  17.8G test.log (單線程讀取)

        語言 test1 test2 test3 test4 test5 總耗時 平均耗時
        Go 32.99s 34.24s 30.33s 31.21s 35.70s 164.16s 32.83s
        Python 32分鐘還沒執(zhí)行完            
        Java 226s 206s 153s 219s 183s 987s 197.4s
        瀏覽 22
        點贊
        評論
        收藏
        分享

        手機掃一掃分享

        編輯 分享
        舉報
        評論
        圖片
        表情
        推薦
        點贊
        評論
        收藏
        分享

        手機掃一掃分享

        編輯 分享
        舉報
        1. <strong id="7actg"></strong>
        2. <table id="7actg"></table>

        3. <address id="7actg"></address>
          <address id="7actg"></address>
          1. <object id="7actg"><tt id="7actg"></tt></object>
            黄色毛片在线免费观看 | 又黄又刺激的视频 | 激情婷婷av | 欧美日韩在线播放三区四区 | 中国老女人日b | 4438最新网址 | 男的操女的在线观看 | 欧美日韩国产成人 | 国产老太婆做爰毛片95 | 特级西西大胆WWW147 |