Skip to content

Instantly share code, notes, and snippets.

@bczhc
Last active January 17, 2026 02:01
Show Gist options
  • Select an option

  • Save bczhc/f3d8de0fb1ad76500b56c441c537f7cd to your computer and use it in GitHub Desktop.

Select an option

Save bczhc/f3d8de0fb1ad76500b56c441c537f7cd to your computer and use it in GitHub Desktop.
截至1.12 Wplace快照总区块数 #wplace

处理:

ls all/*.diff | parallel -k '                                                                                                                        32s 09:49:48
    filename=$(basename {} .diff);
    # Extract parts: YYYY-MM-DD and HH-MM-SS
    d_part=${filename%T*};
    t_part=${filename#*T};
    # Replace hyphens with colons in the time part only
    t_fixed=$(echo ${t_part%.*} | tr "-" ":");
    # Combine back into a valid ISO string
    ts_iso="${d_part}T${t_fixed}";

    echo -n "$(date -d "$ts_iso" +%s) ";
    ~/wt/archive-tool show {} | grep "Total chunks:" | awk "{print \$3}"
' | tee /tmp/a.txt
(*1. 导入数据,假设是空格分隔的两列*)rawData = Import["/tmp/a.txt", "Table"];

(*2. 处理数据:将第一列(Unix Timestamp)转换为 DateObject*)
(*Unix 时间戳是从 1970-01-01 开始的秒数*)
processedData = Map[{DateObject[#[[1]]], #[[2]]} &, rawData];

(*3. 绘制折线图*)
DateListPlot[processedData, PlotStyle -> Blue, Filling -> Bottom, 
 FrameLabel -> {"Time", "Total Chunks"}, 
 PlotLabel -> "Total Chunks Growth Over Time", GridLines -> Automatic,
  PlotRange -> Full, ImageSize -> Large, 
 FrameTicks -> {{Table[{y, NumberForm[y, {Infinity, 0}]}, {y, 200000, 
      1200000, 200000}], None}, {Automatic, None}}]
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment