Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
3aca1f9
fix: add need-get-period feature
nokosaaan Apr 15, 2026
87742e5
fix: delete the portion of impl about macro
nokosaaan Apr 15, 2026
5d30fc2
fix: delete unnecessary imports
nokosaaan Apr 15, 2026
a1f0619
Merge branch 'main' of https://github.com/tier4/awkernel into eva-fea…
nokosaaan Apr 17, 2026
59b5354
fix: attach cargo fmt 1
nokosaaan Apr 17, 2026
b77385e
fix: delete if-else diversion and focus feature diversion
nokosaaan Apr 17, 2026
85d9042
fix: apply cargo fmt 2
nokosaaan Apr 17, 2026
c88633a
fix: experimental apply for perf
nokosaaan Apr 17, 2026
8495759
fix: experimental apply for perf 2
nokosaaan Apr 17, 2026
8e03ef4
fix: delete .clone() which has Copy trait
nokosaaan Apr 17, 2026
a728ff8
fix: unused imports and unnecessary casting
nokosaaan Apr 17, 2026
6585af5
fix: apply cargo fmt 3
nokosaaan Apr 17, 2026
bc19c69
fix: delete unnecessary import
nokosaaan Apr 17, 2026
adfa4fd
fix: delete unnecessary functions and modify kernel/src/main.rs
nokosaaan Apr 17, 2026
377d1b1
fix: add get_period_count for getting periodic period
nokosaaan Apr 17, 2026
ddd69c2
fix: async_lib/Cargo.toml
nokosaaan Apr 17, 2026
37cae77
fix: apply cargo fmt 4
nokosaaan Apr 17, 2026
3ff0804
fix: delete NodeRecord
nokosaaan Apr 17, 2026
d8e28cd
fix: unify start publish_timestamp_at to pubsub.rs
nokosaaan Apr 17, 2026
2de13a9
fix: delete unused imports
nokosaaan Apr 17, 2026
9a9d2da
fix: add dependics in kernel/Cargo.toml for print_timestamp_table
nokosaaan Apr 17, 2026
14f92ca
fix: clarify the responsibility between send_all and send_all_with_me…
nokosaaan Apr 17, 2026
968c058
fix: delete get_period and
nokosaaan Apr 17, 2026
efc54b6
fix: apply cargo fmt 5
nokosaaan Apr 17, 2026
64e87b6
fix: apply copilot suggestion in kernel/main.rs
nokosaaan Apr 17, 2026
12fb54a
fix: delete unnecessary declare and add dependics to need
nokosaaan Apr 17, 2026
0e3156a
fix(perf): make period-based recording resilient to dag/index overflow
Copilot Apr 17, 2026
bf7ba7b
fix(perf): warn when period metadata saturates
Copilot Apr 17, 2026
5ff88eb
fix: apply copilot suggestion 1
nokosaaan Apr 17, 2026
465f75e
fix: apply copilot suggestion 2
nokosaaan Apr 17, 2026
74b6d27
Update awkernel_async_lib/src/pubsub.rs
nokosaaan Apr 17, 2026
f8589f5
Update awkernel_async_lib/src/pubsub.rs
nokosaaan Apr 17, 2026
160c9eb
fix(perf): snapshot and cap timestamp summary output
Copilot Apr 17, 2026
2c08c1c
Update awkernel_async_lib/src/task.rs
nokosaaan Apr 17, 2026
696a272
fix: apply cargo fmt 6
nokosaaan Apr 19, 2026
6545deb
fix(time_interval): pass dag_id as u32 to perf period API
Copilot Apr 19, 2026
1e85519
Update awkernel_async_lib/src/pubsub.rs
nokosaaan Apr 20, 2026
ef6f24e
docs(time_interval): update interval example with dag_id argument
Copilot Apr 20, 2026
dd39f3e
fix: change pubsub test case
nokosaaan Apr 20, 2026
74fef12
Merge branch 'eva-feature' of https://github.com/tier4/awkernel into …
nokosaaan Apr 20, 2026
9b76322
Update awkernel_async_lib/src/task.rs
nokosaaan Apr 20, 2026
786398a
Update awkernel_async_lib/src/pubsub.rs
nokosaaan Apr 20, 2026
b54e541
Merge branch 'main' into eva-feature
nokosaaan Apr 20, 2026
50794a2
Update awkernel_async_lib/src/dag.rs
nokosaaan Apr 20, 2026
95c8fef
Update awkernel_async_lib/src/task.rs
nokosaaan Apr 20, 2026
c5ed577
fix: apply cargo fmt 7
nokosaaan Apr 20, 2026
e83e3cc
Merge branch 'main' of https://github.com/tier4/awkernel into eva-fea…
nokosaaan Apr 27, 2026
8ff460b
fix: renaming variables 1
nokosaaan May 20, 2026
96c8a11
Merge branch 'main' of https://github.com/tier4/awkernel into eva-fea…
nokosaaan May 20, 2026
aae485c
fix: apply cargo fmt 8
nokosaaan May 20, 2026
c657097
fix: renaming variables and feature name 2
nokosaaan May 20, 2026
d4a2814
fix: renaming valiables 3 and apply cargo fmt 9
nokosaaan May 20, 2026
40270fa
fix: renaming valiables 4
nokosaaan May 20, 2026
96c3263
fix: renaming valiables 5
nokosaaan May 20, 2026
f8b4d38
fix: renaming valiables 6 for period-index-propagation
nokosaaan May 20, 2026
78839af
Merge branch 'main' of https://github.com/tier4/awkernel into eva-fea…
nokosaaan May 20, 2026
b4a7cbf
fix: apply cargo fmt 9
nokosaaan May 20, 2026
b09da48
fix: reimpl deleted contextswitchmain by merge conflict
nokosaaan May 20, 2026
39ba2bb
fix: time_interval
nokosaaan May 20, 2026
4da1730
fix: add comment for test code
nokosaaan May 20, 2026
19874cd
fix: assert to log::warn!
nokosaaan May 20, 2026
2824a24
fix: delete if-else handling with dag_info in start_interrupt,start_c…
nokosaaan May 20, 2026
4160343
fix: update_time_and_state_for_dag
nokosaaan May 20, 2026
4408799
fix: delete unused import
nokosaaan May 20, 2026
bbc863e
fix: add comment on MAX_LOGS, MAX_PUBSUB, MAX_NODES
nokosaaan May 20, 2026
b89e91d
fix: change value of MAX_NODES
nokosaaan May 20, 2026
2845e6a
fix: assert to log::warn!
nokosaaan May 20, 2026
c5ea68f
fix: add comment on MAX_LOGS
nokosaaan May 22, 2026
0945616
fix: change logic of logging recorder
nokosaaan May 22, 2026
3277d25
fix: add comment to recv_all_with_period_index
nokosaaan May 22, 2026
27699d7
fix: add magic number to valiable
nokosaaan May 22, 2026
6ab7887
fix: logging way following ci build test
nokosaaan May 22, 2026
4e0ff80
fix: add issue link
nokosaaan May 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions awkernel_async_lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ no_preempt = []
spinlock = ["awkernel_lib/spinlock"]
clippy = []
perf = []
period-index-propagation = ["perf"]
85 changes: 76 additions & 9 deletions awkernel_async_lib/src/dag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ use crate::{
time_interval::interval,
Attribute, MultipleReceiver, MultipleSender, VectorToPublishers, VectorToSubscribers,
};

#[cfg(feature = "period-index-propagation")]
use crate::task::perf::{
get_period_index, increment_period_index, record_subscribe_timestamp,
update_cycle_end_timestamp, update_cycle_start_timestamp,
};

use alloc::{
borrow::Cow,
boxed::Box,
Expand Down Expand Up @@ -926,10 +933,31 @@ where
Args::create_subscribers(subscribe_topic_names, Attribute::default());

loop {
let args: <<Args as VectorToSubscribers>::Subscribers as MultipleReceiver>::Item =
subscribers.recv_all().await;
let results = f(args);
publishers.send_all(results).await;
#[cfg(feature = "period-index-propagation")]
{
let (args, period_index): (
<<Args as VectorToSubscribers>::Subscribers as MultipleReceiver>::Item,
u32,
) = subscribers.recv_all_with_period_index().await;

// [end] pubsub communication latency
let end = awkernel_lib::time::Time::now().uptime().as_nanos() as u64;
record_subscribe_timestamp(period_index as usize, end, 1, dag_info.node_id.clone());

let results = f(args);
publishers
.send_all_with_period_index(results, 1, period_index as usize, dag_info.node_id)
.await;
}

#[cfg(not(feature = "period-index-propagation"))]
{
let args: <<Args as VectorToSubscribers>::Subscribers as MultipleReceiver>::Item =
subscribers.recv_all().await;

let results = f(args);
publishers.send_all(results).await;
}
}
};

Expand Down Expand Up @@ -966,13 +994,31 @@ where
Attribute::default(),
);

let mut interval = interval(period);
let mut interval = interval(period, dag_info.dag_id);
// Consume the first tick here to start the loop's main body without an initial delay.
interval.tick().await;

loop {
let results = f();
publishers.send_all(results).await;
#[cfg(feature = "period-index-propagation")]
{
let index = get_period_index(dag_info.dag_id) as usize;
if index != 0 {
// [start] cycle deviation index >= 1
let release_time = awkernel_lib::time::Time::now().uptime().as_nanos() as u64;
update_cycle_start_timestamp(index, release_time, dag_info.dag_id);
}
let results = f();
publishers
.send_all_with_period_index(results, 0, index, dag_info.node_id)
.await;
increment_period_index(dag_info.dag_id);
}

#[cfg(not(feature = "period-index-propagation"))]
{
let results = f();
publishers.send_all(results).await;
}

#[cfg(feature = "perf")]
periodic_measure();
Expand Down Expand Up @@ -1006,8 +1052,29 @@ where
Args::create_subscribers(subscribe_topic_names, Attribute::default());

loop {
let args: <Args::Subscribers as MultipleReceiver>::Item = subscribers.recv_all().await;
f(args);
#[cfg(feature = "period-index-propagation")]
{
let (args, period_index): (<Args::Subscribers as MultipleReceiver>::Item, u32) =
subscribers.recv_all_with_period_index().await;

// [end] pubsub communication latency
let end = awkernel_lib::time::Time::now().uptime().as_nanos() as u64;
record_subscribe_timestamp(period_index as usize, end, 2, dag_info.node_id.clone());

let timenow = awkernel_lib::time::Time::now().uptime().as_nanos() as u64;
if period_index != 0 {
update_cycle_end_timestamp(period_index as usize, timenow, dag_info.dag_id);
}

f(args);
}

#[cfg(not(feature = "period-index-propagation"))]
{
let args: <Args::Subscribers as MultipleReceiver>::Item =
subscribers.recv_all().await;
f(args);
}
}
};

Expand Down
Loading
Loading