Skip to content

Commit

Permalink
analytics is good enough for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner committed Oct 6, 2021
1 parent bd14ad9 commit 3b10cfa
Show file tree
Hide file tree
Showing 14 changed files with 440 additions and 145 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -383,3 +383,6 @@ picohttp:

analytics:
./node_modules/.bin/peechy --schema src/analytics/schema.peechy --zig src/analytics/analytics_schema.zig

analytics-features:
@cd misctools; zig run --main-pkg-path ../ ./features.zig
2 changes: 1 addition & 1 deletion build-id
Original file line number Diff line number Diff line change
@@ -1 +1 @@
32
33
4 changes: 4 additions & 0 deletions integration/scripts/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ const bunExec = process.env.BUN_BIN || "bun";
const bunProcess = child_process.spawn(bunExec, bunFlags, {
cwd: snippetsDir,
stdio: "pipe",
env: {
...process.env,
DISABLE_BUN_ANALYTICS: "1",
},

shell: false,
});
Expand Down
17 changes: 17 additions & 0 deletions misctools/features.zig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const std = @import("std");

const path_handler = @import("../src/resolver/resolve_path.zig");
usingnamespace @import("../src/global.zig");
const Features = @import("../src/analytics/analytics_thread.zig").Features;

// zig run --main-pkg-path ../ ./features.zig
pub fn main() anyerror!void {
var stdout_ = std.io.getStdOut();
var stderr_ = std.io.getStdErr();
var output_source = Output.Source.init(stdout_, stderr_);
Output.Source.set(&output_source);
defer Output.flush();

var writer = Output.writer();
try Features.Serializer.writeAll(@TypeOf(writer), writer);
}
Loading

0 comments on commit 3b10cfa

Please sign in to comment.